首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >詹金斯安装失败

詹金斯安装失败
EN

Ask Ubuntu用户
提问于 2020-04-29 05:23:25
回答 1查看 2.2K关注 0票数 0

有人能帮我在Ubuntu上安装Jenkin吗?

我收到了下面的日志

代码语言:javascript
复制
Reading package lists... Done
Building dependency tree       
Reading state information... Done
jenkins is already the newest version (2.222.3).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up oracle-java11-installer-local (11.0.7-1~linuxuprising0) ...
Before installing this package,
please download the Oracle JDK 11 .tar.gz file
with the same version as this package (version 11.0.4),
and place it in /var/cache/oracle-jdk11-installer-local,

E.g.:
sudo mkdir -p /var/cache/oracle-jdk11-installer-local
sudo cp jdk-11.0.4_linux-x64_bin.tar.gz /var/cache/oracle-jdk11-installer-local/
sha256sum mismatch jdk-11.0.7_linux-x64_bin.tar.gz
Oracle JDK 11 is NOT installed.
dpkg: error processing package oracle-java11-installer-local (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up jenkins (2.222.3) ...
Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
invoke-rc.d: initscript jenkins, action "start" failed.
● jenkins.service - LSB: Start Jenkins at boot time
   Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-04-29 10:49:28 IST; 4ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 16643 ExecStart=/etc/init.d/jenkins start (code=exited, status=1/FAILURE)

Apr 29 10:49:28 ip-172-26-11-113 systemd[1]: Starting LSB: Start Jenkins at boot time...
Apr 29 10:49:28 ip-172-26-11-113 jenkins[16643]: Found an incorrect Java version
Apr 29 10:49:28 ip-172-26-11-113 jenkins[16643]: Java version found:
Apr 29 10:49:28 ip-172-26-11-113 jenkins[16643]: java version "13.0.2" 2020-01-14
Apr 29 10:49:28 ip-172-26-11-113 jenkins[16643]: Java(TM) SE Runtime Environment (build 13.0.2+8)
Apr 29 10:49:28 ip-172-26-11-113 jenkins[16643]: Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)
Apr 29 10:49:28 ip-172-26-11-113 jenkins[16643]: Aborting
Apr 29 10:49:28 ip-172-26-11-113 systemd[1]: jenkins.service: Control process exited, code=exited status=1
Apr 29 10:49:28 ip-172-26-11-113 systemd[1]: Failed to start LSB: Start Jenkins at boot time.
Apr 29 10:49:28 ip-172-26-11-113 systemd[1]: jenkins.service: Unit entered failed state.
Apr 29 10:49:28 ip-172-26-11-113 systemd[1]: jenkins.service: Failed with result 'exit-code'.
dpkg: error processing package jenkins (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java11-installer-local
 jenkins
E: Sub-process /usr/bin/dpkg returned an error code (1)

究竟是什么问题?Jankins需要哪个Java版本?我相信Java-13是一个非常新的版本,java是完全向后兼容的。

EN

回答 1

Ask Ubuntu用户

发布于 2020-12-24 19:52:26

我认为Jenkins正在寻找Oracle JDK 11。

没有安装Oracle JDK 11。 dpkg:错误处理包oracle-java11-installer-local (--配置):安装后安装的返回错误退出状态1

如果您正在安装Jenkins,那么在安装Jenkins之前安装JDK 11。请遵循以下Ubuntu20.04教程

OpenJDK安装

案例-2

如果安装了Jenkins,并且它在exit code 1中异常退出,当您尝试使用systemctl status jenkins.service获得状态时,您将得到以下输出

代码语言:javascript
复制
Nov 13 09:35:43 tattve jenkins[1038744]: Found an incorrect Java version
Nov 13 09:35:43 tattve jenkins[1038744]: Java version found:
Nov 13 09:35:43 tattve jenkins[1038776]: openjdk version "11.0.9.1" 2020-11-04
Nov 13 09:35:43 tattve jenkins[1038776]: OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
Nov 13 09:35:43 tattve jenkins[1038776]: OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
Nov 13 09:35:43 tattve jenkins[1038744]: Aborting

请执行建议的解决方案这里

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1232718

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档