hadoop version命令给出了与java相关的错误(没有这样的文件或目录)

mrphzbgm  于 2021-05-30  发布在  Hadoop
关注(0)|答案(1)|浏览(398)

运行hadoop命令时出错

sagar@sagar-desktop:~$ hadoop version
    Warning: $HADOOP_HOME is deprecated.
    Downloads/hadoop-1.2.1/bin/hadoop: line 350: /usr/lib/java/jdk1.7.0_67/bin/java: No  such file or directory
    Downloads/hadoop-1.2.1/bin/hadoop: line 434: /usr/lib/java/jdk1.7.0_67/bin/java: No such file or directory

java和hadoop路径是

$JAVA_HOME = /usr/lib/java/jdk1.7.0_67
$HADOOP_HOME = Downloads/hadoop-1.2.1

请帮我解决这些错误

btqmn9zl

btqmn9zl1#

请阅读此hadoop wiki页面。你需要设置 JAVA_HOME 变量输入 hadoop-env.sh 文件存在于hadoop/conf目录中,格式化hdfs,然后您可以尝试 hadoop version 命令。

相关问题