问题描述
我检查了stackoverflow上的答案,没有解决方案适用于我的案例。
命令:
bin / hadoop namenode -format
错误讯息:
/ bin / java:没有这样的文件或目录1.7.0_09 /
/ bin / java:没有这样的文件或目录1.7.0_09 /
/ bin / java:无法执行:没有这样的文件或目录
hadoop_env.sh 中的相关更改
#要使用的java实现。需要。
export JAVA_HOME = / usr / local / jdk1.7.0_09 /
ln -sc:\程序文件\java\jdk1.7.0_09/ usr / local /jdk1.7.0_09
Java HOME:
C:\程序文件\Java\jdk1.7.0_09
路径:
C:\cygwin64\bin; C:\cygwin64\usr\ sbin
如果有人有线索,请随时指出。谢谢。
@xhudik @ s.singh最后!在Windows中修改hadoop_env.sh时出现问题。我已经解决了dos2unix命令的问题,以消除dos风格的字符。
如果在cygwin中找不到dos2unix命令,请重新下载cygwin并更新它。
请点击此处链接:
命令是
dos2unix hadoop_env.sh
然后一切都完成了。希望我的经验能帮助别人。
感谢s.singh和xhudik的帮助。
I've checked answers on stackoverflow, no solutions work for my case.
Command:
bin/hadoop namenode -format
Error Message:
/bin/java: No such file or directory1.7.0_09/
/bin/java: No such file or directory1.7.0_09/
/bin/java: cannot execute: No such file or directory
Relevant change in hadoop_env.sh
# The java implementation to use. Required.
export JAVA_HOME=/usr/local/jdk1.7.0_09/
I use soft-link by
ln -s "c:\Program Files\java\jdk1.7.0_09" /usr/local/jdk1.7.0_09
Java HOME:
C:\Program Files\Java\jdk1.7.0_09
Path :
C:\cygwin64\bin;C:\cygwin64\usr\sbin
If any one has clues, please feel free to point it out. Thanks.
@xhudik @s.singh Finally! There is a problem when modifying hadoop_env.sh in Windows. I've fixed the problem with dos2unix command to eliminate dos style character.If dos2unix command can't be found in cygwin, re-download cygwin and update it.
Please follow the link here:
https://superuser.com/questions/612435/cygwin-dos2unix-command-not-found
The command is
dos2unix hadoop_env.sh
Then everything is all set. Hope my experience would help others.Thanks for s.singh and xhudik's help.
这篇关于Hadoop安装:运行hadoop格式时没有这样的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!