2

i have tried all possible solutions through google but still not working i am not getting what is this command not found error from hadoop-env.sh and bin/java not such a directory,

Here is hadoop-env.sh

export JAVA_HOME=/cygdrive/c/Java/jre6

export JAVA_HOME=c:/Java/jre6

Here is my error bellow

-bash-4.1$ bin/hadoop namenode -format

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 2: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 7: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 12: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 15: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 18: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 22: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 32: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 35: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 38: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 41: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 44: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 49: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 55: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 58: $'\r': command not found

/bin/java: No such file or directory

/bin/java: No such file or directory

/bin/java: cannot execute: No such file or directory

Sarde
  • 658
  • 1
  • 8
  • 19

1 Answers1

2

Go to environment variable and then advance setting Go to user variable and setVariable JAVA_HOME and there Value C:\Java\sunjdk6.0.24 Then go to Path and set cygwin path c:\cygwin\bin;c:\cygwin\usr\bin

DO it if not done erlier, If you still facing problem then see Link for Hadoop installation on windows and follow every steps.

Sandeep Singh
  • 7,790
  • 4
  • 43
  • 68
  • Thank you! I had set Java to a PATH variable but not Cygwin. No wonder my system still wasn't finding what it needed! – Simon Hayward Oct 22 '13 at 07:07
  • This solution is not working for me. Actually, I have this similar error. – Chris Su Nov 24 '13 at 02:06
  • @ChrisSu Did you check the **Link**.What java version you are using.What is your cgywin location. – Sandeep Singh Nov 24 '13 at 04:21
  • @s.singh Hi, thanks for your response. Yes. I followed the link's procedure. My cgywin location is exactly the same. c:\cygwin\bin. Please take a look at my Post: http://stackoverflow.com/questions/20170317/hadoop-installation-no-such-file-while-run-hadoop-format – Chris Su Nov 26 '13 at 05:30