无法在ubuntu 22.04上安装jenkins

wyyhbhjk  于 2023-01-08  发布在  Jenkins
关注(0)|答案(1)|浏览(330)

我试图在数字海洋ubuntu22.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.

请让我知道,如果需要更多的细节,我是新的Jenkins安装在ubuntu。

bvuwiixz

bvuwiixz1#

我也面临着同样的问题,并试图按照上述数字海洋链接中给出的步骤,但没有运气。
然后通过纠正dpkg包问题并安装正确的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显式启动它

相关问题