我试图在独立模式下运行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
如何删除错误?
答案 0 :(得分:0)
您运行hadoop
的用户似乎没有运行java
的权限。
但是通过查看java的二进制文件所在的路径(/ home / laxmikant / java /),用户laxmikant
或root用户都可以轻松访问它。因此,如果您尝试以用户laxmikant
执行它并仍然收到错误,那么可能没有正确安装Java。另外,请确保在hadoop的conf / hadoop-env.sh中正确设置JAVA_HOME
。