CDH4在不同的目录中查找java

时间:2013-10-03 18:23:33

标签: java hadoop cloudera

我在安装了Cloudera CDH 4.3的计算机上运行hadoop命令,并遇到此错误:

/workplace/cloudera/parcels/CDH-4.3.1-1.cdh4.3.1.p0.110/bin/../lib/hadoop/bin/hadoop: line 139: /opt/java/latest/bin/java: No such file or directory
/workplace/cloudera/parcels/CDH-4.3.1-1.cdh4.3.1.p0.110/bin/../lib/hadoop/bin/hadoop: line 139: exec: /opt/java/latest/bin/java: cannot execute: No such file or directory

然后我检查了那台机器上的java,发现它已安装但位于不同的位置:

whereis java
java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz

如何让CDH4从/usr/bin/java中获取java?

1 个答案:

答案 0 :(得分:0)

建立符号链接/ opt / java / latest / bin / java - >的/ usr /斌/ java吗?