将Java从1.7.0_201更新到最新版本并出现错误

时间:2019-09-18 08:21:24

标签: java jenkins

我正尝试将Java从1.7.0_201更新到最新版本,无论我做什么,都会收到以下错误消息:

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)

1 个答案:

答案 0 :(得分:1)

如果要使用Jenkins,首先不要使用Java的最新版本。始终使用推荐的Jenkins Java版本:

现代Jenkins版本具有以下Java requirements

Java 8 runtime environments, both 32-bit and 64-bit versions are supported

Since Jenkins 2.164 and 2.164.1 [1], Java 11 runtime environments are supported

    Running Jenkins with Java 11 is documented here

    There are some precautions to take when upgrading from Java 8 to Java 11 in Jenkins, please follow these guidelines.

Older versions of Java are not supported

Java 9 and Java 10 are not supported

Java 12 is not supported

因此,首先升级到Java 8,这是Jenkins的推荐版本。而不是最新的。