2013-03-05 114 views
0

我試圖在獨立模式下運行hadoop。當我嘗試執行命令在獨立模式下執行hadoop示例時拒絕權限

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

我收到以下錯誤:

[email protected]:~/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

看來您正在運行的用戶hadoop沒有權限運行java。 ,但通過查看java的二進制文件所在的路徑(/ home/laxmikant/java /),用戶laxmikant或root用戶應該可以輕鬆訪問。因此,如果您嘗試以用戶laxmikant的身份執行它並仍然出現錯誤,那麼可能沒有正確安裝Java。還要確保你在hadoop的conf/hadoop-env.sh中正確設置了JAVA_HOME

+0

我已經正確安裝了java路徑......哪些java給出了正確的路徑。 – Amnesiac 2013-03-06 19:38:41

+0

現在它說 - bash:/home/laxmikant/java/jdk1.7.0_04/bin/java:權限被拒絕 bash:/home/laxmikant/java/jdk1.7.0_04/bin/java:權限被拒絕 – Amnesiac 2013-03-07 07:19:39