这是我正在关注的教程:
http://wiki.apache.org/hadoop/Running_Hadoop_On_Ubuntu_Linux_(Single-Node_Cluster )
我正在尝试格式化 hdfs namenode
root@alexander-desktop:/usr/local/hadoop/bin# ./hadoop namenode -format
./hadoop: line 258: /usr/lib/jvm/java-6-sun/bin/java: No such file or directory
./hadoop: line 289: /usr/lib/jvm/java-6-sun/bin/java: No such file or directory
./hadoop: line 289: exec: /usr/lib/jvm/java-6-sun/bin/java: cannot execute: No such file or directory
我还包括了我对 / 所做的更改etc/bash.bashrc
。这些是为了配置路径:
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
export JDK_HOME=$JAVA_HOME
export PATH=$PATH:$JAVA_HOME/bin
我检查了是否设置了 java 变量
echo $JAVA_HOME
。下面是路径
/usr/lib/jvm/java-6-openjdk
which java
$JAVA_HOME
返回与指向不同的二进制文件。解决此问题的最佳方法是什么?