无法为 java 版本错误升级 jenkins
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/45591869/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
can't upgrade jenkins for java version error
提问by MohammedSimba
I have Jenkins running on my Ubuntu 14.04, and i am trying to do upgrade for jenkins using normal apt-get install jenkins
, but when i try to do it, i keep getting the error:
我的 Jenkins 在我的 Ubuntu 14.04 上运行,我正在尝试使用 normal 对 jenkins 进行升级apt-get install 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)
Nothing shown in the jenkins logs, even when restarting jenkins i get the same jave wrong version error,
jenkins 日志中没有显示任何内容,即使在重新启动 jenkins 时,我也会收到相同的 jave 错误版本错误,
Any help please?
请问有什么帮助吗?
回答by racraman
You're using Java 7, but Jenkins needs Java 8 - see: https://jenkins.io/blog/2017/04/10/jenkins-has-upgraded-to-java-8
您使用的是 Java 7,但 Jenkins 需要 Java 8 - 请参阅:https: //jenkins.io/blog/2017/04/10/jenkins-has-upgraded-to-java-8
回答by Ognjen Mi?i?
You need JDK 8 to run jenkins: https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04
您需要 JDK 8 才能运行 jenkins:https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04