0
votes

I am following this tutorial http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/

I am getting this error when trying to format the hdfs file system

/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

When I echo java home this is what i get

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

This is my java path in hadoop-env.sh

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

running Ubuntu 10.04 and hadoop 1.0.4

1

1 Answers

1
votes

This is simply a typo, you didn't write java correctly in your hadoop-env.sh file. It should read like this:

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

And not:

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

Don't forget to restart your cluster afterwards to take this into consideration.