Hdoop 启动:localhost: Error: JAVA_HOME is not set and could not be found.

参考教程:
http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html

其中有

Prepare to Start the Hadoop Cluster

Unpack the downloaded Hadoop distribution. In the distribution, edit
the file etc/hadoop/hadoop-env.sh to define some parameters as
follows:
export JAVA_HOME=/usr/java/latest(原来是${JAVA_HOME},把这个改为相应的jdk真实路劲)
Try the following command:
bin/hadoop
This will display the usage documentation for the
hadoop script.

自己不按照文档说的来,因为在shell脚本中一般$${JAVA_HOME} 或者$JAVA_HOME
都是取变量的值,然后左边又有=等号,所以就自作聪明的认为没有必要了!
关于环境相关,以后还是就按照官方的来吧。。。。

现在还有极大的可能是,JAVA_HOME没有被 export

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值