0
votes

I am trying to run a hadoop cluster like this in the latest version of ubuntu 64bit (vm):

hadoop launch-cluster MyCluster 1

this is the output that i get:

/usr/bin/hadoop: line 320: /usr/lib/jvm/java-6-sun/bin/java: No such file or directory
/usr/bin/hadoop: line 390: /usr/lib/jvm/java-6-sun/bin/java: No such file or directory

I am setting this JAVA_HOME in /usr/bin/hadoop this way export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")

When I check the value of JAVA_HOME, i get /usr/lib/jvm/java-7-openjdk-amd64/jre/

line 320 of the file is:

JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} -Xmx32m ${HADOOP_JAVA_PLATFORM_OPTS} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`

and line 390:

exec "$JAVA" -Dproc_$COMMAND $JAVA_HEAP_MAX $HADOOP_OPTS -classpath "$CLASSPATH" $CLASS "$@"

Why am I getting this message? /usr/lib/jvm/java-6-sun/bin/java: No such file or directory

1

1 Answers

2
votes

The value of $JAVA is probably set somewhere in your script to point to an older Java 6 binary. In this case it points to /usr/lib/jvm/java-6-sun/bin/java which causes the shell to fail when running the commands. Set the $JAVA variable to point to the right location of your Java 7 binary and the problem should be solved.