1

当我尝试apt-get update在 Debian 上使用命令时,我发现自己陷入了一种错误循环,其中包含以下两个错误:NO_PUBKEY 和 KEYEXPIRED

W: There is no public key available for the following key IDs: 4D270D06F42584E6 W: GPG error: http://archive.debian.org lenny/updates Release: The following signatures were invalid: KEYEXPIRED 1356982504 W: GPG error: http://archive.debian.org lenny/volatile Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY DFD993306D849617 W: Failed to fetch http://archive.debian.org/debian-securty/dists/lenny/updates/main/source/Sources 404 Not Found [IP: 130.89.148.13 80]

首先我得到 KEYEXPIRED 错误(使用 NO_PUBKEY 但现在不是重点)然后我尝试了这个解决方案:

http://community.aegirproject.org/node/757/revisions/2077/view

(但我不确定我做的一切是否正确)

W: There is no public key available for the following key IDs: 4D270D06F42584E6 W: GPG error: http://archive.debian.org lenny/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B W: GPG error: http://archive.debian.org lenny/volatile Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY DFD993306D849617 W: Failed to fetch http://archive.debian.org/debian-securty/dists/lenny/updates/main/source/Sources 404 Not Found [IP: 130.89.148.13 80]

然后我得到 NO_PUBKEY 错误,我尝试了这个解决方案,然后我回到了最初的问题:(

sudo apt-key adv --recv-keys --keyserver keys.gnupg.net(8位数字键)

你可以帮帮我吗?

4

1 回答 1

3

我知道这有点晚了,但是最近我在 ubuntu 中遇到了同样的问题,这就是我解决这个问题的方法。首先,我从 keyserver 获得了密钥,如下所示。您可能需要根据您的环境更改 KEY 和服务器,

sudo gpg --keyserver hkp://keyserver.ubuntu.com --recv-key 40976EAF437D05B5

之后,您需要将密钥添加到您的密钥库(您可能需要以“su”用户身份执行以下操作)

gpg --export --armor 40976EAF437D05B5 | apt-key add -

从这里找到完整的细节GPG 错误:公钥不可用 NO_PUBKEY

希望它会有所帮助(我也是ubuntu的新手,这就是我整理的方式)

于 2014-08-12T23:05:42.607 回答