hadoop启动时报错,java: No such file or directory和localhost: Error: JAVA_HOME is not set.
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hadoop启动时报错,java: No such file or directory和localhost: Error: JAVA_HOME is not set.相关的知识,希望对你有一定的参考价值。
hadoop-env.sh文件中配置为
# The java implementation to use. Required.
# export JAVA_HOME=/cygdrive/d/Java/jdk1.6.0_26
jdk1.6.0_26安装路径为:
D:\Java\jdk1.6.0_26\
电脑中环境变量java_home为:
D:\Java\jdk1.6.0_26\;D:\Java\jdk1.6.0_26\jre\bin
完全按照《Hadoop开发者》第一期,在win7环境下配置的,运行./start-all.sh,报错java: No such file or directory和localhost: Error: JAVA_HOME is not set.
william@william-PC /cygdrive/d/hadoop/run/bin
$ ls
hadoop slaves.sh start-mapred.sh stop-mapred.sh
hadoop-config.sh start-all.sh stop-all.sh task-controller
hadoop-daemon.sh start-balancer.sh stop-balancer.sh
hadoop-daemons.sh start-dfs.sh stop-dfs.sh
rcc start-jobhistoryserver.sh stop-jobhistoryserver.sh
william@william-PC /cygdrive/d/hadoop/run/bin
$ ./start-all.sh
starting namenode, logging to /cygdrive/d/hadoop/run/libexec/../logs/hadoop-william-name node-william-PC.out
/cygdrive/d/hadoop/run/libexec/../bin/hadoop: line 321: D:\Java\jdk1.6.0_26\;D:\Java\jdk 1.6.0_26\jre\bin/bin/java: No such file or directory
/cygdrive/d/hadoop/run/libexec/../bin/hadoop: line 387: D:\Java\jdk1.6.0_26\;D:\Java\jdk 1.6.0_26\jre\bin/bin/java: No such file or directory
/cygdrive/d/hadoop/run/libexec/../bin/hadoop: line 387: exec: D:\Java\jdk1.6.0_26\;D:\Ja va\jdk1.6.0_26\jre\bin/bin/java: cannot execute: No such file or directory
localhost: starting datanode, logging to /cygdrive/d/hadoop/run/libexec/../logs/hadoop-w illiam-datanode-william-PC.out
localhost: Error: JAVA_HOME is not set.
localhost: starting secondarynamenode, logging to /cygdrive/d/hadoop/run/libexec/../logs /hadoop-william-secondarynamenode-william-PC.out
localhost: Error: JAVA_HOME is not set.
starting jobtracker, logging to /cygdrive/d/hadoop/run/libexec/../logs/hadoop-william-jo btracker-william-PC.out
/cygdrive/d/hadoop/run/libexec/../bin/hadoop: line 321: D:\Java\jdk1.6.0_26\;D:\Java\jdk 1.6.0_26\jre\bin/bin/java: No such file or directory
/cygdrive/d/hadoop/run/libexec/../bin/hadoop: line 387: D:\Java\jdk1.6.0_26\;D:\Java\jdk 1.6.0_26\jre\bin/bin/java: No such file or directory
/cygdrive/d/hadoop/run/libexec/../bin/hadoop: line 387: exec: D:\Java\jdk1.6.0_26\;D:\Ja va\jdk1.6.0_26\jre\bin/bin/java: cannot execute: No such file or directory
localhost: starting tasktracker, logging to /cygdrive/d/hadoop/run/libexec/../logs/hadoo p-william-tasktracker-william-PC.out
localhost: Error: JAVA_HOME is not set.
刚开始学hadoop,就遇到这个问题,已经周旋好几天好,始终解决不了,拜求大虾帮小弟看看啊!
# export JAVA_HOME=/cygdrive/d/Java/jdk1.6.0_26
------->
# The java implementation to use. Required
export JAVA_HOME=/cygdrive/d/Java/jdk1.6.0_26 参考技术B 很明显是java home没有配好 ,输入cd $JAVA_HOME,看行不行?本回答被提问者采纳 参考技术C 1234123
以上是关于hadoop启动时报错,java: No such file or directory和localhost: Error: JAVA_HOME is not set.的主要内容,如果未能解决你的问题,请参考以下文章
使用exceljs时报错:no such file or directory
hadoop 启动ha错误 nice: /bin/hdfs: No such file or directory
pycharm 用远程环境时报错bash: line 0: cd: /home/tmp: No such file or directory
pip 安装包时报错 /usr/bin/pip: No such file or directory
pip 安装包时报错 /usr/bin/pip: No such file or directory
pycharm 用远程环境时报错bash: line 0: cd: /home/tmp: No such file or directory