我让Jenkins在我的Ubuntu 14.04上运行,我正在尝试使用普通apt-get install jenkins
升级jenkins,但是当我尝试这样做时,我不断收到错误:
Setting up jenkins (2.73) ...
Found an incorrect Java version
Java version found:
java version "1.7.0_131"
OpenJDK Runtime Environment (IcedTea 2.6.9) (7u131-2.6.9-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.131-b00, mixed mode)
Aborting
invoke-rc.d: initscript jenkins, action "start" failed.
dpkg: error processing package jenkins (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
jenkins
E: Sub-process /usr/bin/dpkg returned an error code (1)
jenkins日志中没有显示任何内容,即使重新启动jenkins我也得到相同的jave错误版本错误,
请帮忙吗?
答案 0 :(得分:8)
您使用的是Java 7,但Jenkins需要Java 8 - 请参阅:https://jenkins.io/blog/2017/04/10/jenkins-has-upgraded-to-java-8
答案 1 :(得分:4)
你需要JDK 8来运行jenkins: https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04
答案 2 :(得分:1)
使用这些命令更新Java版本,
background_color =(.0, .9, .25, 1)
并按照此命令更改Java版本的默认选择模式。
sudo -E add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
应将其设置为Java 8值。