在运行`sbin/start-dfs.sh`时出现错误

在运行sbin/start-dfs.sh时出现错误 :
starting namenode, logging to /usr/mahout/hadoop-0.20.2/bin/../logs/hadoop-srp-namenode-srp.out
localhost: starting datanode, logging to /usr/mahout/hadoop-0.20.2/bin/../logs/hadoop-srp-namenode-srp.outt
localhost: Error: JAVA_HOME is not set.
localhost: starting datanode, logging to /usr/mahout/hadoop-0.20.2/bin/../logs/hadoop-srp-datanode-srp.out
localhost: Error: JAVA_HOME is not set.
starting jobtracker, logging to /usr/mahout/hadoop-0.20.2/bin/../logs/hadoop-srp-jobtracker-srp.out
localhost: starting tasktracker, logging to /usr/mahout/hadoop-0.20.2/bin/../logs/hadoop-srp-tasktracker-srp.out
localhost: Error: JAVA_HOME is not set.


解决方案是:在/usr/mahout/hadoop-0.20.2/conf/文件下,有一个hadoop-env.sh文件,添加 语句:
export JAVA_HOME=/usr/mahout/jdk1.7.0_07

 
 
 
 

转载于:https://www.cnblogs.com/jichui/p/7777826.html

你可能感兴趣的:(在运行`sbin/start-dfs.sh`时出现错误)