Java教程

ERROR: JAVA_HOME is not set and could not be found.

本文主要是介绍ERROR: JAVA_HOME is not set and could not be found.,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

ERROR: JAVA_HOME is not set and could not be found.

背景

  1. 启动hadoop集群时报错,先是报错Attempting to operate on hdfs namenode as root but there is no HDFS_NAMENODE_USER defined. Aborting

解决方案

  1. 在$HADOOP_HOME/etc/hadoop目录下添加jdk的位置,注意分发到集群其它机器

    export JAVA_HOME=/opt/module/jdk1.8
    
这篇关于ERROR: JAVA_HOME is not set and could not be found.的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!