Reputation: 11
Iam trying to install Hadoop 2.6.0 in my local system for some research purpose but when i complete my configurations and java installations the installation stops. It encounters an error at the time of executing the command
"hdfs namenode -format"
The error message i get is as follows
"usr/local/hadoop/bin/hdfs: line 276: /usr/lib/jvm/java-7-oracle/jre/bin/java/bin/java: Not a directory /usr/local/hadoop/bin/hdfs: line 276: exec: /usr/lib/jvm/java-7-oracle/jre/bin/java/bin/java: cannot execute: Not a directory"
I was wondering if anyone have encountered this error before. Help me solve this.... Thanks in advance
Upvotes: 0
Views: 3788
Reputation: 597
Looks like Hadoop 2.6 is not respecting JAVA_HOME variable. This might be a Java 8 undocumented feature. :-)
It is found in the hadoop install folder under etc/hadoop/hadoop-env.sh There is a line that sets the JAVA_HOME in there. It will append /bin/java to what ever you put in that line. In my case java is the default install in /usr/bin/java so I just set it to /usr and it worked.
Upvotes: 4