欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

启动hadoop,报错Error JAVA_HOME is not set and could not be found

程序员文章站 2022-07-14 15:17:41
...

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

解决方法:

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

启动hadoop,报错Error JAVA_HOME is not set and could not be found

输入export,查看jdk环境变量是否设置成功:
启动hadoop,报错Error JAVA_HOME is not set and could not be found

在hadoop文件中修改环境变量
在hadoop-env.sh中,再显示地重新声明一遍JAVA_HOME
启动hadoop,报错Error JAVA_HOME is not set and could not be found

启动!

相关标签: hadoop