1
liprais 2019-04-02 17:28:59 +08:00 1
| Error: Unable to find a compatible version of Java on this host,|
| either because JAVA_HOME has not been set or because a | | compatible version of Java is not installed. | 这行没看到么...... |
2
boris1993 2019-04-02 19:18:35 +08:00 via Android
1 楼正解
请学会阅读程序的输出,而不是全靠蒙全靠猜 |
3
lcdxiangzi OP @liprais 报错日志肯定会看的。这个都看到了,我本地 java 都装好的。但是实际的问题是,非 root 安装就是报错,尝试了两次了。root 安装,同样的命令就可以通过。我都是尝试过的。
|
4
lcdxiangzi OP |
5
boris1993 2019-04-03 08:58:21 +08:00 via Android
所以检查 JAVA_HOME 的值对不对
|
6
lcdxiangzi OP @boris1993
/etc/profile 内容如下 export JAVA_HOME=/home/hadoop/jdk1.8.0_161 export JRE_HOME=/home/hadoop/jdk1.8.0_161/jre export CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib export HADOOP_HOME=/home/hadoop/hadoop-3.1.1 export HIVE_HOME=/home/hadoop/apache-hive-3.1.0-bin export HBASE_HOME=/home/hadoop/hbase-1.4.8 export ZOOKEEPER_HOME=/home/hadoop/zookeeper-3.4.12 export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$HIVE_HOME/bin:$HBASE_HOME/bin:$ZOOKEEPER_HOME/bin:$ZOOKEEPER_HOME/conf 应该是正常的吧,因为我现在搭 cdh 用的都是之前跑过原生 hadoop 的环境。 |
7
defunct9 2019-04-03 09:04:33 +08:00
开 ssh,让我上去试试
|
8
lcdxiangzi OP @defunct9 这个搞不定,公司的服务器,虽然是测试环境,但是肯定没有对外开放的。你需要看什么,我可以贴上来
|
9
defunct9 2019-04-03 09:29:49 +08:00
猜不了火车
|
10
catcalse 2019-04-03 09:35:57 +08:00
vi ~/.bashrc
source ~/.bashrc |
11
scalaer 2019-04-03 09:36:14 +08:00
你看看 jps 能用不
|
12
lcdxiangzi OP 正在解决依赖关系
--> 正在检查事务 ---> 软件包 cloudera-manager-agent.x86_64.0.6.2.0-968826.el7 将被 安装 ---> 软件包 cloudera-manager-daemons.x86_64.0.6.2.0-968826.el7 将被 安装 ---> 软件包 cloudera-manager-server.x86_64.0.6.2.0-968826.el7 将被 安装 --> 解决依赖关系完成 依赖关系解决 ======================================================================================================= Package 架构 版本 源 大小 ======================================================================================================= 正在安装: cloudera-manager-agent x86_64 6.2.0-968826.el7 cloudera-manager 9.7 M cloudera-manager-daemons x86_64 6.2.0-968826.el7 cloudera-manager 1.1 G cloudera-manager-server x86_64 6.2.0-968826.el7 cloudera-manager 9.8 k 事务概要 ======================================================================================================= 安装 3 软件包 总下载量:1.1 G 安装大小:1.4 G Is this ok [y/d/N]: y Downloading packages: (1/3): cloudera-manager-agent-6.2.0-968826.el7.x86_64.rpm | 9.7 MB 00:00:07 (2/3): cloudera-manager-server-6.2.0-968826.el7.x86_64.rpm | 9.8 kB 00:00:00 (3/3): cloudera-manager-daemons-6.2.0-968826.el7.x86_64.rpm | 1.1 GB 00:03:22 ------------------------------------------------------------------------------------------------------- 总计 5.6 MB/s | 1.1 GB 00:03:22 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安装 : cloudera-manager-daemons-6.2.0-968826.e [######################### ] 1/3^ 正在安装 : cloudera-manager-daemons-6.2.0-968826.el7.x86_64 1/3 正在安装 : cloudera-manager-agent-6.2.0-968826.el7.x86_64 2/3 Created symlink from /etc/systemd/system/multi-user.target.wants/cloudera-scm-agent.service to /usr/lib/systemd/system/cloudera-scm-agent.service. Created symlink from /etc/systemd/system/multi-user.target.wants/supervisord.service to /usr/lib/systemd/system/supervisord.service. 正在安装 : cloudera-manager-server-6.2.0-968826.el7.x86_64 3/3 验证中 : cloudera-manager-agent-6.2.0-968826.el7.x86_64 1/3 验证中 : cloudera-manager-daemons-6.2.0-968826.el7.x86_64 2/3 验证中 : cloudera-manager-server-6.2.0-968826.el7.x86_64 3/3 已安装: cloudera-manager-agent.x86_64 0:6.2.0-968826.el7 cloudera-manager-daemons.x86_64 0:6.2.0-968826.el7 cloudera-manager-server.x86_64 0:6.2.0-968826.el7 完毕! 这次是 root 用户安装的,成功了。貌似我开出来的普通用户有哪里没有配置好?算了,暂时觉得 root 一路走下去了。实在不能再等了。 感谢回复的各位 |
13
lcdxiangzi OP @catcalse
.bashrc # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # Uncomment the following line if you don't like systemctl's auto-paging feature: # export SYSTEMD_PAGER= # User specific aliases and functions |
14
lcdxiangzi OP |
15
lcdxiangzi OP 大家感兴趣可以继续讨论,需要啥,告诉我,我来贴。两条路一起走吧。应该不影响的。
|
16
fireapp 2019-04-03 09:51:53 +08:00 via iPhone
一步步试,先 suodo yum install cloudera-manager-agent.x86_64 安装下试试
|
17
fireapp 2019-04-03 09:56:21 +08:00 via iPhone
再 sudo export JAVA_HOME=java_path && sudo yum install cloudera-manager-agent.x86_64 继续试
|
18
lcdxiangzi OP @fireapp #16 试过,报错。
#17 sudo export 好像不可以合用吧,我把 sudo 拿掉,试下 |
19
fireapp 2019-04-03 10:09:55 +08:00 via iPhone
继续写个脚步 ,export && yum install,然后 sudo 执行它
|
20
lcdxiangzi OP @fireapp #17
+======================================================================+ | Error: Unable to find a compatible version of Java on this host,| | either because JAVA_HOME has not been set or because a | | compatible version of Java is not installed. | +----------------------------------------------------------------------+ | Please install either: | | - a supported version of the Oracle JDK from the Oracle Java web | | site: | | > http://www.oracle.com/technetwork/java/javase/index.html < | | OR | | - a supported version of the OpenJDK from your OS vendor. Help for | | some OSes are available at: | | > http://openjdk.java.net/install/ < | | | | Cloudera Manager requires Oracle JDK or OpenJDK 1.8 or later. | | NOTE: Cloudera Manager will find the Oracle JDK when starting, | | regardless of whether you installed the JDK using a binary | | installer or the RPM-based installer. | +======================================================================+ error: %pre(cloudera-manager-daemons-6.2.0-968826.el7.x86_64) scriptlet failed, exit status 1 Error in PREIN scriptlet in rpm package cloudera-manager-daemons-6.2.0-968826.el7.x86_64 error: cloudera-manager-daemons-6.2.0-968826.el7.x86_64: install failed 正在安装 : cloudera-manager-agent-6.2.0-968826.el7.x86_64 2/2 Created symlink from /etc/systemd/system/multi-user.target.wants/cloudera-scm-agent.service to /usr/lib/systemd/system/cloudera-scm-agent.service. Created symlink from /etc/systemd/system/multi-user.target.wants/supervisord.service to /usr/lib/systemd/system/supervisord.service. 验证中 : cloudera-manager-agent-6.2.0-968826.el7.x86_64 1/2 验证中 : cloudera-manager-daemons-6.2.0-968826.el7.x86_64 2/2 已安装: cloudera-manager-agent.x86_64 0:6.2.0-968826.el7 失败: cloudera-manager-daemons.x86_64 0:6.2.0-968826.el7 完毕! 还是报错 |
21
boris1993 2019-04-03 10:17:35 +08:00 via Android
它说找不到兼容的 Java,检查下你现在安装的 Java 与工具要求的 Java 版本是否一致
|
22
fireapp 2019-04-03 10:29:49 +08:00 via iPhone
楼主说 su root 下能安装,但是 sudo 就报错,感觉是安装脚本在 sudo 下找不到 java_home,手动指定它试试,不行的话下个源码看看,改改自己编译一个
|
23
lcdxiangzi OP |
24
xiaonoah 2019-04-03 12:19:35 +08:00 via Android
普通用户下执行 which java,看看你 java 安装路径是在哪里。root 用的 java 版本和普通用户的可能不一样
|
25
sunchen 2019-04-03 13:31:37 +08:00
JAVA_HOMe 改成和 CDH 要求的一致的 /usr/java/jdkxxxxx
|
26
sunchen 2019-04-03 13:32:16 +08:00
|
27
lcdxiangzi OP |