首页 > 解决方案 > 无法在 Ubuntu 20.04 上安装 Jenkins

问题描述

我正在尝试在我的 Ubuntu EC2 实例上安装 Jenkins,我执行了以下步骤来安装但无法安装它。

$sudo apt update $sudo apt install openjdk-8-jdk $wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - $sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' $sudo apt update < --------- (这里我得到以下错误)

root@ip-172-31-44-187:~# sudo apt update Ign:1 https://pkg.jenkins.io/debian-stable binary/ InRelease Err:2 https://pkg.jenkins.io/debian -stable binary/ 发布证书验证失败:证书不受信任。证书链使用过期证书。无法握手:证书验证出错。[IP:151.101.154.133 443] 点击:3 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu焦点 InRelease 获取:4 http://ap-south-1.ec2.archive.ubuntu .com/ubuntu焦点更新 InRelease [114 kB] 获取:5 http://security.ubuntu.com/ubuntu focus-security InRelease [114 kB] 获取:6 http://ap-south-1.ec2.archive .ubuntu.com/ubuntufocus-backports InRelease [101 kB] 正在读取软件包列表...完成 E:存储库“http://pkg.jenkins.io/debian-stable binary/Release”没有发布文件。N:从这样的存储库更新不能安全地完成,因此默认情况下是禁用的。N:有关存储库创建和用户配置的详细信息,请参见 apt-secure(8) 手册页。

标签: jenkins

解决方案


我没有使用 apt-get upgrade 升级每个软件包,而是使用: sudo apt install ca-certificates

然后: sudo apt-get update工作得很好。


推荐阅读