[大数据]启动hadoop,报错Error JAVA_HOME is not set and could not be found

  报如错误:JAVA_HOME is not set and could not be found,可能是因为JAVA_HOME环境没配置正确,还有一种情况是即使各结点都正确地配置了JAVA_HOME,但在集群环境下还是报该错误,解决方法是显示地重新声明一遍JAVA_HOME

        1、检查JAVA_HOME是否配置正确(伪分布式环境)

        启动start-all.sh时报错,如下所示

        

        解决方法:

                输入java –version,查看jdk是否安装成功

               

                输入export,查看jdk环境变量是否设置成功

               

        2、在集群环境下,即使各结点都正确地配置了JAVA_HOME,也会报如下错误

         

                 解决方法:

                         在hadoop-env.sh中,再显示地重新声明一遍JAVA_HOME

    测试效果


test.png                      

原文链接: [大数据]启动hadoop,报错Error JAVA_HOME is not set and could not be found 版权所有,转载时请注明出处,违者必究。
注明出处格式:流沙团 ( http://gyarmy.com/post-524.html )

发表评论

0则评论给“[大数据]启动hadoop,报错Error JAVA_HOME is not set and could not be found”