start-all.sh启动hadoop,出现error:JAVA_HOME is not set and could not be found

Q: start-all.sh启动hadoop,出现error:JAVA_HOME is not set and could not be found?????

A: hadoop集群,一般出现这种情况,需要在hadoop-env.sh 再声明一下JAVA_HOME:

hadoop-env.sh 在 /usr/local/hadoop/etc/hadoop 目录下

eg: java在 /usr/local/jdk1.8.0_221,在hadoop-env.sh中添加如下内容:

export JAVA_HOME=/usr/local/jdk1.8.0_221

即可。

你可能感兴趣的:(start-all.sh启动hadoop,出现error:JAVA_HOME is not set and could not be found)