启动jenkins报错:ERROR: No Java executable found in current PATH: /bin:/usr/bin:/sbin:/usr/sbin

ERROR: No Java executable found in current PATH: /bin:/usr/bin:/sbin:/usr/sbin
If you actually have java installed on the system make sure the executable is in the aforementioned path and that 'type -p java' returns the java executable path

解决:

按照提示:先type -p java

root@nuoniu-System-Product-Name:~# type -p java
/usr/jdk/jdk1.8.0_181/bin/java

如果什么都没有,就没有JDK,需要安装

然后建立个软连接:ln -s jdk路径/java /usr/bin/java

ln -s /usr/jdk/jdk1.8.0_181/bin/java /usr/bin/java

在重新启动:sudo /etc/init.d/jenkins restart,就可以了

root@nuoniu-System-Product-Name:~# sudo /etc/init.d/jenkins restart
Correct java version found
[ ok ] Restarting jenkins (via systemctl): jenkins.service.

 

你可能感兴趣的:(Jenkins,Jenkins)