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

时间:2014-09-09 10:09:56

标签: java hadoop

我在运行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

请帮我解决这些错误

1 个答案:

答案 0 :(得分:0)

请阅读this Hadoop wiki page。您需要在hadoop / conf目录中的JAVA_HOME文件中设置hadoop-env.sh变量,格式化HDFS,然后您可以尝试hadoop version命令。