无法修复 GPG 错误 NO_PUB_KEY

无法修复 GPG 错误 NO_PUB_KEY

正如标题所示,我遇到了常见的“GPG 错误...NO_PUB_KEY”错误,但我根本无法修复它。我尝试了这两种方法Y PPA Manager和命令行sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUB_KEY>,但都不起作用;事实上,后者总是返回类似这样的结果

gpg: key 98AB5139: "Oracle Corporation (VirtualBox archive signing key) <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

sources.list当我修改文件以删除有关 ppa 的两行时,问题就开始了dropbox。从那时起,我开始遇到很多 GPG 错误。

W: GPG error: http://deb.torproject.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 74A941BA219EC810
W: GPG error: http://download.virtualbox.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
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://dl.google.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991
W: GPG error: http://archive.canonical.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://desktop-download.mendeley.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D800C7D66F036044
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.ntop.org x64/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 98C843C67921DF34

W: GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.ntop.org all/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 98C843C67921DF34

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com trusty-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 trusty-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://linux.dropbox.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FC918B335044912E
W: GPG error: http://archive.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease  

W: Failed to fetch http://packages.ntop.org/apt-stable/14.04/x64/InRelease  

W: Failed to fetch http://packages.ntop.org/apt-stable/14.04/all/InRelease  

W: Some index files failed to download. They have been ignored, or old ones used instead.

到目前为止,甚至使用该文件恢复文件也sources.list.save不起作用。但是,说实话,我不知道为什么这个更改会破坏所有内容。

答案1

此解决方法可能会帮助您:

sudo apt-get clean
sudo mv /var/lib/apt/lists /var/apt/lists.old
mkdir -p /var/lib/apt/lists/partial
sudo apt-get update

答案2

看来它apt只能处理不到 40 个源,而且我已经达到极限了。

对我来说最有效的解决方案是从和中删除一些无用的.list*文件。/etc/apt/sources.list.d/.gpg*/etc/apt/trusted.gpg.d

虽然我很久以前就达到了限制,但我认为问题现在才出现,因为今天我尝试使用 来“导入所有缺失的密钥” Y PPA Manager。我的意思是,也许我有一些没有任何 GPG 密钥的 PPA,我不知道。

如果其他人知道不同的解决方法,欢迎您。

相关内容