Starting Jenkins bash: /usr/bin/java: No such file or directory
问题描述在CentOS 6.5上启动Jenkins service jenkins start报错Starting Jenkins bash: /usr/bin/java: No such file or directory[FAILED]问题分析JDK的安装路径和Jenkins 默认的...
·
问题描述
在CentOS 6.5上启动Jenkins
service jenkins start
报错
Starting Jenkins bash: /usr/bin/java: No such file or directory
[FAILED]
问题分析
JDK的安装路径和Jenkins 默认的JDK路径不一致
[root@iZbp14w0b2rs7i1400bjjmZ ~]# echo $JAVA_HOME
/usr/local/jdk1.8.0_121/jdk
[root@iZbp14w0b2rs7i1400bjjmZ ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/jdk1.8.0_121/jdk/bin:/root/bin
[root@iZbp14w0b2rs7i1400bjjmZ ~]# which java
/usr/local/jdk1.8.0_121/jdk/bin/java
问题解决
建立软连接
ln -s /usr/local/jdk1.8.0_121/jdk/bin/java /usr/bin/java
使用which java验证,发现地址已经改变
[root@iZbp14w0b2rs7i1400bjjmZ ~]# which java
/usr/bin/java
更多推荐
已为社区贡献53条内容
所有评论(0)