zsh: command not found: mvn

新打开终端,执行mvn相关命令,报错“zsh: command not found: mvn”

原因:zsh的配置文件没有加载~/.bash_profile的配置项。
解决方法:在zsh的配置文件中添加source ~/.bash_profile配置项的内容

vim ~/.zshrc

添加如下内容:

source ~/.bash_profile

猜你喜欢

转载自blog.csdn.net/bobocqu/article/details/127484561