简体   繁体   English

Maven:找不到命令:mvn

[英]Maven: command not found: mvn

My maven stopped working all of a sudden.我的 maven 突然停止工作。 I am using macOS Catalina 10.15.6.我正在使用 macOS Catalina 10.15.6。 Maven is installed in Applications directory. Maven 安装在 Applications 目录中。 It was working fine for over an year.它工作了一年多。 My.bash_profile has我的.bash_profile 有

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. MacOS 最近将默认 shell 更改为 zsh,output 显示您正在运行 zsh。 You now need to update $HOME/.zshrc and $HOME/.zlogin (or change your login shell back to bash : chsh -s /bin/bash ).您现在需要更新$HOME/.zshrc /.zshrc 和$HOME/.zlogin (或将您的登录名 shell 改回bashchsh -s /bin/bash )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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