繁体   English   中英

无法在 ubuntu 22.04 上安装 jenkins

[英]Unable to install jenkins on ubuntu 22.04

我正在尝试在 digitalOcean ubuntu 22.04 上安装 jenkins,但它不起作用。

我试过以下版本:

wget https://pkg.jenkins.io/debian-stable/binary/jenkins_2.332.4_all.deb

wget https://pkg.jenkins.io/debian-stable/binary/jenkins_2.332.3_all.deb

wget https://pkg.jenkins.io/debian-stable/binary/jenkins_2.332.2_all.deb

wget https://pkg.jenkins.io/debian-stable/binary/jenkins_2.332.1_all.deb

wget https://pkg.jenkins.io/debian-stable/binary/jenkins_2.346.3_all.deb

wget https://pkg.jenkins.io/debian-stable/binary/jenkins_2.346.2_all.deb

但我在所有版本中都低于错误

--2022-08-29 14:55:34--  https://pkg.jenkins.io/debian-stable/binary/jenkins_2.332.4_all.deb
Resolving pkg.jenkins.io (pkg.jenkins.io)... 151.101.158.133, 2a04:4e42:25::645
Connecting to pkg.jenkins.io (pkg.jenkins.io)|151.101.158.133|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://mirrors.jenkins.io/debian-stable/jenkins_2.332.4_all.deb [following]
--2022-08-29 14:55:35--  https://mirrors.jenkins.io/debian-stable/jenkins_2.332.4_all.deb
Resolving mirrors.jenkins.io (mirrors.jenkins.io)... 52.167.253.43
Connecting to mirrors.jenkins.io (mirrors.jenkins.io)|52.167.253.43|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://mirrors.tuna.tsinghua.edu.cn/jenkins/debian-stable/jenkins_2.332.4_all.deb [following]
--2022-08-29 14:55:37--  https://mirrors.tuna.tsinghua.edu.cn/jenkins/debian-stable/jenkins_2.332.4_all.deb
Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.15.130, 2402:f000:1:400::2
Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.15.130|:443... failed: Connection timed out.
Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|2402:f000:1:400::2|:443... failed: Network is unreachable.

如果需要更多详细信息,请告诉我,我是 ubuntu 上 jenkins 安装的新手。

我遇到了同样的问题,并尝试按照上述数字海洋链接中给出的步骤进行操作,但没有成功。

然后通过更正 dpkg package 问题并安装正确的 java 和 JRE 工具来解决问题以满足 Jenkins LTS(自 Jenkins 2.357 和 LTS 2.361.1 起)

首先重启 Ubuntu

reboot

其次,安装Open JDK 17

sudo apt update
sudo apt install openjdk-17-jdk
sudo apt install openjdk-17-jre

成功安装 JDK 17 后,最后一次重启并运行以下命令重新安装 Jenkins

sudo apt-get purge jenkins
apt-get install jenkins

现在检查状态sudo systemctl status jenkins.service它应该自动运行,如果没有,那么您可以通过键入sudo systemctl start jenkins显式启动它

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM