1. sudo vim /etc/profile
sudo into the profile file
2.
export JAVA_HOME=/usr/lib/jvm/jdk-1.8.0_212
export HADOOP_HOME=usr/local/hadoop
export PATH=.:$HADOOP_HOME/bin:$JAVA_HOME/bin:$PATH
Add the above three to the end of the profile file
Press i to edit first, press Esc after writing, then: wq save and exit
3.source /etc/profile
Update environment variables
This problem can be solved by the above three steps
Similar Posts:
- [Mac Error]-bash: mysql: command not found
- Solve the problem of ADB: command not found on MAC
- Mac ADB prompts command not found
- -bash: ls: command not found [How to Solve]
- [Solved] JPype Error: FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/lib/jvm’
- JAVA Command Error: A JNI error has occurred, please check your installation and try again [Solved]
- CentOS Error -bash:systemctl:command not found
- When installing MySQL database on MAC, the system prompts MySQL: command not found
- Super detail: command not found: the scratch solution (add the scratch environment variable to Zsh under MAC)
- When installing MySQL database on Mac OS, the system prompts MySQL: command not found