我正在关注本教程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