我已经通过谷歌尝试了所有可能的解决方案,但仍然无法正常工作 我没有从hadoop-env.sh和bin / java找到这个命令找不到的错误,而不是这样的目录,
这是hadoop-env.sh
导出JAVA_HOME = / cygdrive / c / Java / jre6
导出JAVA_HOME = c:/ Java / jre6
以下是我的错误
-bash-4.1 $ bin / hadoop namenode -format
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:第2行:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:第7行:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:第12行:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:line 15:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:第18行:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:第22行:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:line 32:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:line 35:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:第38行:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:line 41:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:line 44:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:line 49:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:line 55:$'\ r':找不到命令
/usr/local/hadoop-1.2.1/libexec /../ conf / hadoop-env.sh:line 58:$'\ r':找不到命令
/ bin / java:没有这样的文件或目录
/ bin / java:没有这样的文件或目录
/ bin / java:无法执行:没有这样的文件或目录
答案 0 :(得分:2)
转到环境变量然后提前设置 转到用户变量和setVariable JAVA_HOME ,其值为 C:\ Java \ sunjdk6.0.24 然后转到路径并设置cygwin路径 c:\ cygwin \ bin; c:\ cygwin \ usr \ bin
如果没有做得更好,那么如果您仍然遇到问题,请在Windows上查看Link Hadoop安装并按照每个步骤操作。