Debian9更换可用软件源

[复制链接] |主动推送
查看105 | 回复0 | 2024-9-12 00:54:45 | 显示全部楼层 |阅读模式
由于debian9 停止维护,目前可用的软件源如下:

deb http://archive.debian.org/debian/ stretch main contrib non-free
deb-src http://archive.debian.org/debian/ stretch main contrib non-free
deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
1.设置软件源

cat >/etc/apt/sources.list<<EOF
deb http://archive.debian.org/debian/ stretch main contrib non-free
deb-src http://archive.debian.org/debian/ stretch main contrib non-free
deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
EOF
2.更新软件源: apt update -y

3.提示gpg证书错误处理

报错信息:

W: GPG error: http://archive.debian.org/debian stretch-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
安装需要的依赖和软件:

apt-get install software-properties-common dirmngr -y
添加gpg证书验证:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  <PUBKEY>
<PUBKEY2>
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 0E98404D386FA1D9
001859vwnxdmf368wd438n.jpg

4.再次执行更新软件源:apt update -y

001859rz3yi7ktsro3zn3n.jpg
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则