When installing maven, it reported -bash: mvn: command not found. I checked multiple environment variables and it was correct. Now I don’t know how to solve the problem
过去多啦不再A梦2017-05-27 17:43:45
This is my configuration as follows, you can change the path to yours
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home
export PATH=$PATH:$JAVA_HOME/bin
export M2_HOME=/Users/user/workspace/Tools/apache-maven-3.3.9
export PATH=$PATH:$M2_HOME/bin
After configuration is completed, check which file you configured it in (if it is /etc/profile), and then execute
source /etc/profile
某草草2017-05-27 17:43:45
First
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then
brew install maven
Just restart the terminal and it’s done