[英]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.