无法在Ubuntu 14.04.5上安装Jenkins

时间:2017-09-26 12:35:14

标签: java ubuntu jenkins

我尝试在Ubuntu 14.04.5上安装jenkins并最终出现了一些错误,

Setting up jenkins (2.80) ...
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
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 jenkins
E: Sub-process /usr/bin/dpkg returned an error code (1)

由于jenkins需要运行Java 8,我尝试安装Java 8并再次获得上述相同的错误。我试过删除jenkins,最后得到了同样的错误“找到了一个不正确的Java版本”。

我需要帮助才能解决此问题。提前谢谢。

1 个答案:

答案 0 :(得分:0)

看看这里:

can't upgrade jenkins for java version error

如果这没有帮助:

你有没有检查过替代品和JAVA_HOME?如果没有,请检查这些命令的输出:

update-alternatives --config java

echo $ JAVA_HOME

两者都应设置为java 8值。