0

当我尝试从 shell 启动 Ubuntu 中的 Hadoop 集群时,出现以下错误:

    hduser@duleep-G31M-S2L:/usr/local/hadoop$ /usr/local/hadoop/bin/start-all.sh
/usr/local/hadoop/libexec/../conf/hadoop-env.sh: line 9: export: `/usr/lib/jvm/jdk1.7.0_09': not a valid identifier
Warning: $HADOOP_HOME is deprecated
localhost: /usr/local/hadoop/libexec/../conf/hadoop-env.sh: line 9: export: `/usr/lib/jvm/jdk1.7.0_09': not a valid identifier
localhost: Error: JAVA_HOME is not set.
/usr/local/hadoop/libexec/../conf/hadoop-env.sh: line 9: export: `/usr/lib/jvm/jdk1.7.0_09': not a valid identifier
jobtracker running as process 8066. Stop it first.
localhost: starting tasktracker, logging to /usr/local/hadoop/libexec/../logs/hadoop-hduser-tasktracker-duleep-G31M-S2L.out
localhost: /usr/local/hadoop/libexec/../conf/hadoop-env.sh: line 9: export: `/usr/lib/jvm/jdk1.7.0_09': not a valid identifier
localhost: Error: JAVA_HOME is not set.

如果您知道出了什么问题,请帮忙。

4

2 回答 2

0

检查$HADOOP_HOME/conf/hadoop-env.sh脚本的内容,以获取 JAVA_HOME 导出行 - 看起来您在那里有一个尾随引号。

作为参考,这是我拥有的版本:

# The java implementation to use.  Required.
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_07-i586

如果您仍然遇到问题,请将您的输入粘贴回您的原始问题

于 2013-05-26T12:45:51.990 回答
0

要使用的 java 实现。

改变这个

#export JAVA_HOME=/usr/lib/jvm/jdk1.5.0

export JAVA_HOME=/usr/lib/jvm/jdk1.6.0
于 2013-07-15T12:54:26.087 回答