我怎样才能摆脱这些 NO_PUBKEY 错误?

我怎样才能摆脱这些 NO_PUBKEY 错误?

sudo apt-get update给了我这个错误最后。我正在使用 Y PPA 管理器,现在看来所有 PPA 都正常,但问题(我认为)出在官方 Ubuntu 存储库上:

W: GPG error: http://repository.spotify.com stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 13B00F1FD2C19886
W: GPG error: http://archive.ubuntu.com wily InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://archive.canonical.com wily InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://archive.ubuntu.com wily-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://archive.ubuntu.com wily-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: https://download.01.org vivid InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A902DDA375E52366
W: GPG error: http://archive.ubuntu.com wily-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://archive.ubuntu.com wily-proposed InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32

使用 Ubuntu 15.10

我也尝试过这个,但没有成功:

jose@jose-Lenovo-G400s:~$ sudo gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 40976EAF437D05B5
gpg: requesting key 437D05B5 from hkp server keyserver.ubuntu.com
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

jose@jose-Lenovo-G400s:~$ sudo gpg --export --armor 40976EAF437D05B5 | sudo apt-key add -
sudo: ignoring time stamp from the future
[sudo] password for jose: 
gpg: keyblock resource `/etc/apt/trusted.gpg.d/webupd8team_ubuntu_y-ppa-manager.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/whatsapp-purple_ubuntu_ppa.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/wine_ubuntu_wine-builds.gpg': resource limit
jose@jose-Lenovo-G400s:~$

我不知道我做错了什么。谢谢。

答案1

用户麦克里德回答了一个类似问题说明:

apt 只能处理 /etc/apt/trusted.gpg.d 中的 40 个密钥。41 个密钥会导致您收到 GPG 错误“未找到公钥”,即使您按照所有步骤添加丢失的密钥也是如此。

检查此文件中是否有不再使用的 ppa 中未使用的密钥。如果所有密钥都在使用中,请考虑删除一些 ppa 以及相应的密钥文件/etc/apt/trusted.gpg.d

所以我去/etc/apt/trusted.gpg.d并删除了 2 个 GPG 密钥(现在还剩下 39 个/etc/apt/trusted.gpg.d)。sudo apt-get update工作正常,现在我可以升级任何包。

相关内容