在Ubuntu中启动hadoop单节点集群时遇到问题

时间:2013-05-26 12:36:31

标签: shell ubuntu hadoop

当我尝试从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.

如果你知道什么是错的,请帮忙。

2 个答案:

答案 0 :(得分: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

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

答案 1 :(得分:0)

要使用的java实现。

更改此

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

export JAVA_HOME=/usr/lib/jvm/jdk1.6.0