export hadoop\u conf\u dir=$hadoop_install:etc/hadoop/

3mpgtkmj  于 2021-05-31  发布在  Hadoop
关注(0)|答案(1)|浏览(723)

在伪分布式模式下安装hadoop时,我得到了以下错误

Starting namenodes on [localhost]
localhost: namenode running as process 20678. Stop it first.
localhost: datanode running as process 20831. Stop it first.
Starting secondary namenodes [0.0.0.0]
The authenticity of host '0.0.0.0 (0.0.0.0)' can't be established

我错误地执行了下面的命令

hduser@x7158796-dsmprojb:/usr/local/hadoop$ export HADOOP_CONF_DIR=$HADOOP_INSTALL:etc/hadoop/
hduser@x7158796-dsmprojb:/usr/local/hadoop$ sbin/start-dfs.sh
Error: JAVA_HOME is not set and could not be found

现在它显示了javahome没有设置
我是linux新手,有人能帮我吗。

vtwuwzda

vtwuwzda1#

这里有几个例子,你可以找到设置java主页
有几种方法可以找到java的家
在红帽子上

sudo /usr/sbin/alternatives --config java

那么

export JAVA_HOME=<replace me with from above alteratives command>

在shell中或将其添加到.profile/.bashrc/等中

相关问题