格式

9ceoxa92  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(243)

我正在努力做hadoop的工作,因此我use:-
Java1.6EclipseEuropa3.3.2安装cygwinHadoop0.19.1时使用错误命令occur:-

$ hadoop-*/bin/hadoop namenode -format
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 2: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 7: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 10: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 13: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 16: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 19: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 29: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 32: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 35: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 38: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 41: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 46: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 49: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 52: $'\r': command not found
/home/user/hadoop-0.19.1/bin/../conf/hadoop-env.sh: line 55: $'\r': command not found
cygwin warning:
  MS-DOS style path detected: C:\CYGWIN~1\home\user\HADOOP~1.1\/build/native
  Preferred POSIX equivalent is: /cygdrive/c/CYGWIN~1/home/user/HADOOP~1.1/build/native
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
/bin/java: No such file or directoryC:\Program Files\Java\jdk1.6.0_37
/bin/java: No such file or directoryC:\Program Files\Java\jdk1.6.0_37
/bin/java: cannot execute: No such file or directory Files\Java\jdk1.6.0_37

有人能帮我消除这个错误吗。谢谢您

42fyovps

42fyovps1#

似乎您的换行符有问题,这使得hadoop无法找到java二进制文件。在stackoverflow上看到这个问题。
试着跑步 dos2unix 在你的 hadoop-env.sh .

相关问题