简体   繁体   中英

Maven: command not found: mvn

My maven stopped working all of a sudden. I am using macOS Catalina 10.15.6. Maven is installed in Applications directory. It was working fine for over an year. My.bash_profile has

export JAVA_HOME=$(/usr/libexec/java_home)
export M2_HOME=/Users/vn0gdpo/Applications/apache-maven-3.6.3
export PATH=$PATH:$M2_HOME/bin

在此处输入图像描述

MacOS has recently changed the default shell to zsh and the output shows you are running zsh. You now need to update $HOME/.zshrc and $HOME/.zlogin (or change your login shell back to bash : chsh -s /bin/bash ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM