1

I installed hadoop watching a youtube video. while I try to run this in terminal it gives me this error

$ /usr/local/hadoop-2.6.0/bin/hadoop     version
/usr/local/hadoop-2.6.0/bin/hadoop: line 144:     /usr/iib/java/jdk1.8.0_31/bin//bin/java: No such file or directory

I have java in /usr/lib/java/jdk1.8.0_31/bin/ but I dont know why the error is showing a different path.

I have setup the path in hadoop-env.sh like this

JAVA_HOME=/usr/iib/java/jdk1.8.0_31/bin/
export JAVA_HOME=${JAVA_HOME}

I did the same in .bashrc

export HADOOP_HOME=/usr/local/hadoop-2.6.0/bin/hadoop
JAVA_HOME=/usr/iib/java/jdk1.8.0_31/bin
export JAVA_HOME
PATH=$PATH:$JAVA_HOME
export PATH

Please help me. if you need any extra info please ask.

3 Answers 3

2

Your JAVA_HOME should point to /usr/iib/java/jdk1.8.0_31 and not the bin folder under it.

Also, usually it would be lib and not iib.

The PATH should include the $JAVA_HOME/bin, though.

Sign up to request clarification or add additional context in comments.

5 Comments

I changed as you said but it still giving me this error: srimanth@srimanth-Inspiron-N5110:~$ /usr/local/hadoop-2.6.0/bin/hadoop version /usr/local/hadoop-2.6.0/bin/hadoop: line 144: /usr/iib/java/jdk1.8.0_31/bin/java: No such file or directory
So make sure JAVA_HOME points to the directory where you actually have a Java installation
in usr/lib/java/jdk1.8.0_31/bin/ there are java,javac,javaws etc files are there
Is it really "iib" and not "lib"?
now its working well and fine . thank you so much :D
0

You need to change JAVA_HOME from:

JAVA_HOME=/usr/iib/java/jdk1.8.0_31/bin/ 

TO

JAVA_HOME=/usr/iib/java/jdk1.8.0_31

i.e. Remove bin directory from JAVA_HOME variable.

And change PATH from:

PATH=$PATH:$JAVA_HOME

TO

PATH=$PATH:$JAVA_HOME/bin

2 Comments

I changed as you said but it still giving me this error srimanth@srimanth-Inspiron-N5110:~$ /usr/local/hadoop-2.6.0/bin/hadoop version /usr/local/hadoop-2.6.0/bin/hadoop: line 144: /usr/iib/java/jdk1.8.0_31/bin/java: No such file or directory
thank you man. its a typo mistake I wrote "iib" instead of "lib" :)
0

Ok. I saw you problem.you may be no install jdk or your jdk's path is wrong. now you can test it :

  1. test you jdk location: whereis java
  2. found your path and type it:export JAVA_HOME=/usr/iib/java/jdk1.8.0_31/

  3. export JRE_HOME=/usr/iib/java/jdk1.8.0_31 export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$ClASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

    done it .Then you type hadoop path all type in ~/.bashrc

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.