当前位置:   article > 正文

localhost: Error: JAVA_HOME is not set and could not be found._localhost: error: java home is not set and could n

localhost: error: java home is not set and could not be found.

今天开启 NameNode 和 DataNode 守护进程时出错

localhost: Error: JAVA_HOME is not set and could not be found.
  • 1

但是JAVA环境变量已经配好了,终端输入java -version也会显示版本信息

解决方案如下
修改hadoop-env.sh (我的hadoop安装在/usr/local/ 目录下)

sudo gedit /usr/local/hadoop/etc/hadoop/hadoop-env.sh
  • 1

将原本的JAVA_HOME 替换为绝对路径就可以

  1. #export JAVA_HOME=${JAVA_HOME}
  2. export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_121

转载出处:https://blog.csdn.net/u013247765/article/details/68487214

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/574497
推荐阅读
相关标签
  

闽ICP备14008679号