java - macbook failed to install maven, -bash: mvn: command not found
習慣沉默2017-05-27 17:41:45
0
4
892
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
/$M2_HOME/bin
错了,应该是$M2_HOME/bin
1. source .bash_profile
2. Reopen a window
This is my configuration as follows, you can change the path to yours
After configuration is completed, check which file you configured it in (if it is /etc/profile), and then execute
First
Then
Just restart the terminal and it’s done