尽管安装了 debian-archive-keyring 和 debian-keyring,但无法使用 Debian 档案存储库

尽管安装了 debian-archive-keyring 和 debian-keyring,但无法使用 Debian 档案存储库

我正在尝试在我的 中使用一些 Debian Archive 存储库sources.list,以进行测试。我希望能够从 Debian Sarge 搜索软件包。

我的sources.list样子是这样的:

# Stretch (Debian 9)

deb http://ftp.fr.debian.org/debian/ stretch main
deb-src http://ftp.fr.debian.org/debian/ stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main
# stretch-updates, previously known as 'volatile'
deb http://ftp.fr.debian.org/debian/ stretch-updates main
deb-src http://ftp.fr.debian.org/debian/ stretch-updates main

# Jessie (Debian 8)

deb http://ftp.fr.debian.org/debian/ jessie main
deb-src http://ftp.fr.debian.org/debian/ jessie main
deb http://security.debian.org/debian-security jessie/updates main
deb-src http://security.debian.org/debian-security jessie/updates main

# Wheezy (Debian 7)

deb http://ftp.fr.debian.org/debian/ wheezy main
deb-src http://ftp.fr.debian.org/debian/ wheezy main
deb http://security.debian.org/debian-security wheezy/updates main
deb-src http://security.debian.org/debian-security wheezy/updates main

# Squeeze (Debian 6)
deb http://archive.debian.org/debian/ squeeze main non-free contrib
deb-src http://archive.debian.org/debian/ squeeze main non-free contrib
deb http://archive.debian.org/debian-security/ squeeze/updates main non-free contrib
deb-src http://archive.debian.org/debian-security/ squeeze/updates main non-free contrib

# Lenny (Debian 5)
deb http://archive.debian.org/debian/ lenny main non-free contrib
deb-src http://archive.debian.org/debian/ lenny main non-free contrib
deb http://archive.debian.org/debian-security/ lenny/updates main non-free contrib
deb-src http://archive.debian.org/debian-security/ lenny/updates main non-free contrib

# Etch (Debian 4)
deb http://archive.debian.org/debian/ etch main non-free contrib
deb-src http://archive.debian.org/debian/ etch main non-free contrib
deb http://archive.debian.org/debian-security/ etch/updates main non-free contrib
deb-src http://archive.debian.org/debian-security/ etch/updates main non-free contrib

# Sarge (Debian 3.1)
deb http://archive.debian.org/debian/ sarge main non-free contrib
deb-src http://archive.debian.org/debian/ sarge main non-free contrib
deb http://archive.debian.org/debian-security/ sarge/updates main non-free contrib
deb-src http://archive.debian.org/debian-security/ sarge/updates main non-free contrib

但是,当我运行 时apt update,我无法从 Archive 存储库中检索软件包(但是 stable/oldstable/oldoldstable 存储库工作正常),因为公钥存在问题:

root@sandbox:~# apt update
Ign:1 http://ftp.fr.debian.org/debian stretch InRelease
Hit:2 http://ftp.fr.debian.org/debian stretch-updates InRelease
Ign:3 http://archive.debian.org/debian squeeze InRelease
Ign:4 http://ftp.fr.debian.org/debian jessie InRelease
Get:5 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:6 http://ftp.fr.debian.org/debian wheezy InRelease
Ign:7 http://archive.debian.org/debian-security squeeze/updates InRelease
Hit:8 http://ftp.fr.debian.org/debian stretch Release
Hit:9 http://ftp.fr.debian.org/debian jessie Release
Hit:10 http://ftp.fr.debian.org/debian wheezy Release
Ign:11 http://archive.debian.org/debian lenny InRelease
Ign:12 http://archive.debian.org/debian-security lenny/updates InRelease
Ign:13 http://archive.debian.org/debian etch InRelease
Ign:14 http://archive.debian.org/debian-security etch/updates InRelease
Ign:15 http://archive.debian.org/debian sarge InRelease
Ign:17 http://archive.debian.org/debian-security sarge/updates InRelease
Hit:18 http://security.debian.org/debian-security jessie/updates InRelease
Get:19 http://archive.debian.org/debian squeeze Release [96.0 kB]
Hit:20 http://security.debian.org/debian-security wheezy/updates InRelease
Get:22 http://archive.debian.org/debian-security squeeze/updates Release [86.9 kB]
Get:23 http://archive.debian.org/debian lenny Release [99.6 kB]
Get:25 http://archive.debian.org/debian-security lenny/updates Release [92.4 kB]
Get:26 http://archive.debian.org/debian etch Release [67.8 kB]
Get:27 http://archive.debian.org/debian-security etch/updates Release [37.6 kB]
Get:28 http://archive.debian.org/debian sarge Release [34.6 kB]
Get:29 http://archive.debian.org/debian-security sarge/updates Release [40.7 kB]
Get:30 http://archive.debian.org/debian squeeze Release.gpg [1,655 B]
Get:31 http://archive.debian.org/debian-security squeeze/updates Release.gpg [836 B]
Get:32 http://archive.debian.org/debian lenny Release.gpg [1,034 B]
Get:33 http://archive.debian.org/debian-security lenny/updates Release.gpg [836 B]
Get:34 http://archive.debian.org/debian etch Release.gpg [1,033 B]
Get:35 http://archive.debian.org/debian-security etch/updates Release.gpg [835 B]
Get:36 http://archive.debian.org/debian sarge Release.gpg [378 B]
Get:37 http://archive.debian.org/debian-security sarge/updates Release.gpg [189 B]
Ign:30 http://archive.debian.org/debian squeeze Release.gpg
Ign:31 http://archive.debian.org/debian-security squeeze/updates Release.gpg
Ign:32 http://archive.debian.org/debian lenny Release.gpg
Ign:33 http://archive.debian.org/debian-security lenny/updates Release.gpg
Ign:34 http://archive.debian.org/debian etch Release.gpg
Ign:35 http://archive.debian.org/debian-security etch/updates Release.gpg
Ign:36 http://archive.debian.org/debian sarge Release.gpg
Ign:37 http://archive.debian.org/debian-security sarge/updates Release.gpg
Reading package lists... Done
W: GPG error: http://archive.debian.org/debian squeeze Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9
E: The repository 'http://archive.debian.org/debian squeeze Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.debian.org/debian-security squeeze/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
E: The repository 'http://archive.debian.org/debian-security squeeze/updates Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.debian.org/debian lenny Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 4D270D06F42584E6
E: The repository 'http://archive.debian.org/debian lenny Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.debian.org/debian-security lenny/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B
E: The repository 'http://archive.debian.org/debian-security lenny/updates Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.debian.org/debian etch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B NO_PUBKEY B5D0C804ADB11277
E: The repository 'http://archive.debian.org/debian etch Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.debian.org/debian-security etch/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B
E: The repository 'http://archive.debian.org/debian-security etch/updates Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.debian.org/debian sarge Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A70DAF536070D3A1 NO_PUBKEY B5D0C804ADB11277
E: The repository 'http://archive.debian.org/debian sarge Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.debian.org/debian-security sarge/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A70DAF536070D3A1
E: The repository 'http://archive.debian.org/debian-security sarge/updates Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

所有谈论此事的资源都建议安装debian-keyringdebian-archive-keyring包,但我已经拥有它们了,而且这似乎没有任何作用。

有人有解决方案吗?

答案1

来自文章 修复 Debian 中的 Apt-get:NO_PUBKEY / GPG 错误

基于使用Linux内核的Debian操作系统的计算机中,可能会出现类似NO_PUBKEY的错误信息。这种情况发生在使用Apt-Get命令行工具时,此错误与该工具的更新功能有关。

只需输入适当的命令即可解决此问题。

针对此修复的建议命令是(针对密钥服务器pgpkeys.mit.edu):

gpg --keyserver pgpkeys.mit.edu --recv-key [key-name]
gpg -a --export [key-name] | sudo apt-key add -

您的错误消息中提到的键是:AED4B06F473041FA、64481591B98321F9、4D270D06F42584E6 以及其他(似乎很多)。

对一个键尝试此建议,并检查是否至少有一个错误消息已解决。如果已解决,请对其他键重复此操作。

相关内容