单节点hadoop设置Ubuntu 10.04

时间:2013-01-08 20:47:26

标签: java ubuntu hadoop

我正在关注本教程http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/

尝试格式化hdfs文件系统时出现此错误

/usr/local/hadoop/bin/hadoop: line 320: /usr/lib/jvm/jav-6-sun/bin/java: No such file or directory
/usr/local/hadoop/bin/hadoop: line 390: /usr/lib/jvm/jav-6-sun/bin/java: No such file or directory
/usr/local/hadoop/bin/hadoop: line 390: exec: /usr/lib/jvm/jav-6-sun/bin/java: cannot execute: No such file or directory

当我回应java home时,这就是我得到的

mco@mco-desktop:~$ echo $JAVA_HOME
/usr/lib/jvm/java-6-sun

这是我在hadoop-env.sh

中的java路径
# The java implementation to use.  Required.
export JAVA_HOME=/usr/lib/jvm/jav-6-sun

运行Ubuntu 10.04和hadoop 1.0.4

1 个答案:

答案 0 :(得分:1)

这只是一个错字,您没有在 hadoop-env.sh 文件中正确写入java。它应该是这样的:

# The java implementation to use.  Required.
export JAVA_HOME=/usr/lib/jvm/java-6-sun

而不是:

# The java implementation to use.  Required.
export JAVA_HOME=/usr/lib/jvm/jav-6-sun

之后不要忘记重新启动群集以考虑这一点。