0

我正在尝试在独立模式下运行 hadoop。当我尝试执行命令时

bin/hadoop jar hadoop-mapred-examples-0.21.0.jar grep input output

我收到以下错误:

laxmikant@laxmikant-Inspiron-1464:~/Work/hadoop-0.21.0$ bin/hadoop jar hadoop-mapred-  examples-0.21.0.jar grep input output
/home/laxmikant/Work/hadoop-0.21.0/bin/hadoop-config.sh: line 189:     /home/laxmikant/java/jdk1.7.0_04/bin/java: Permission denied
bin/hadoop: line 120: /home/laxmikant/java/jdk1.7.0_04/bin/java: Permission denied
bin/hadoop: line 120: exec: /home/laxmikant/java/jdk1.7.0_04/bin/java: cannot execute:     Permission denied

如何消除错误?

4

1 回答 1

0

您正在运行的用户似乎hadoop没有运行权限java。但是通过查看 java 的二进制文件所在的路径(/home/laxmikant/java/),用户laxmikant或 root 用户应该可以轻松访问它。因此,如果您尝试以用户身份执行它laxmikant并且仍然收到错误,那么,可能没有正确安装 Java。还要确保JAVA_HOME在 hadoop 的 conf/hadoop-env.sh 中正确设置。

于 2013-03-05T18:44:46.713 回答