我正在尝试在独立模式下运行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
如何删除错误?
1条答案
按热度按时间c0vxltue1#
似乎您运行的用户
hadoop
没有权限运行java
. 但是通过查看java二进制文件所在的路径(/home/laxmikant/java/),用户应该可以很容易地访问它laxmikant
或根用户。因此,如果您试图以用户身份执行它laxmikant
但是仍然得到了错误,那么,也许没有正确安装java。还要确保你设置了JAVA_HOME
在hadoop的conf/hadoop-env.sh中正确。