安装Hadoop时出错。 Java_home未设置

时间:2017-12-24 13:16:04

标签: ubuntu hadoop java-home

我按照link

中的步骤在Ubuntu 17.10中安装Hadoop 3

执行脚本/usr/local/hadoop/sbin/start-all.sh时,我收到以下错误。

/usr/local/hadoop/sbin/start-all.sh
WARNING: Attempting to start all Apache Hadoop daemons as hduser1 in 10 seconds.
WARNING: This is not a recommended production deployment configuration.
WARNING: Use CTRL-C to abort.
Starting namenodes on [localhost]
localhost: ERROR: JAVA_HOME is not set and could not be found.
pdsh@vinoth-ubuntu: localhost: ssh exited with exit code 1
Starting datanodes
localhost: ERROR: JAVA_HOME is not set and could not be found.
pdsh@vinoth-ubuntu: localhost: ssh exited with exit code 1
Starting secondary namenodes [vinoth-ubuntu]
vinoth-ubuntu: ERROR: JAVA_HOME is not set and could not be found.
pdsh@vinoth-ubuntu: vinoth-ubuntu: ssh exited with exit code 1
Starting resourcemanager
resourcemanager is running as process 22791.  Stop it first.
Starting nodemanagers
localhost: ERROR: JAVA_HOME is not set and could not be found.
pdsh@vinoth-ubuntu: localhost: ssh exited with exit code 1

但是当我执行echo "$JAVA_HOME"时,我的输出低于输出

hduser1@vinoth-ubuntu:~$ echo "$JAVA_HOME"
/usr/lib/jvm/java-8-openjdk-amd64/

我还在.bashrc.profilehttpfs-env.sh

中输入了java
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
export JAVA_HOME

0 个答案:

没有答案