无法解决GPG错误


17

我跑sudo apt-get update了,最后我出现了以下错误:

Fetched 14,3 kB in 54s (264 B/s)
Reading package lists... Done
W: GPG error: http://archive.canonical.com saucy 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://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
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.getdeb.net trusty-getdeb InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A8A515F046D7E7CF
W: GPG error: https://private-ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E131728675254D99
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: GPG error: http://archive.ubuntu.com trusty-updates 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://archive.ubuntu.com trusty-backports 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://archive.ubuntu.com trusty-security 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://archive.ubuntu.com trusty-proposed Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32

看来我缺少的键是:

  • 40976EAF437D05B5
  • 3B4FE6ACC0B21F32
  • 16126D3A3E5C1192
  • A040830F7FAC5991
  • A8A515F046D7E7CF
  • E131728675254D99

我看到大多数答案都说要运行:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [MISSING KEY]

我跑了:

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.2LrTHdOU28 --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/amandeepgrewal-notifyosdconfig.gpg --keyring /etc/apt/trusted.gpg.d/apandada1-typhoon.gpg --keyring /etc/apt/trusted.gpg.d/brightbox-ppa.gpg --keyring /etc/apt/trusted.gpg.d/chris-lea-node_js-devel.gpg --keyring /etc/apt/trusted.gpg.d/chris-lea-node_js.gpg --keyring /etc/apt/trusted.gpg.d/colingille-freshlight.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyring /etc/apt/trusted.gpg.d/diesch-testing.gpg --keyring /etc/apt/trusted.gpg.d/duh-golang.gpg --keyring /etc/apt/trusted.gpg.d/ferramroberto-gsharkdown.gpg --keyring /etc/apt/trusted.gpg.d/finalterm-daily.gpg --keyring /etc/apt/trusted.gpg.d/fkrull-deadsnakes.gpg --keyring /etc/apt/trusted.gpg.d/fossfreedom-byzanz.gpg --keyring /etc/apt/trusted.gpg.d/fossfreedom-packagefixes.gpg --keyring /etc/apt/trusted.gpg.d/gophers-go.gpg --keyring /etc/apt/trusted.gpg.d/leolik-leolik.gpg --keyring /etc/apt/trusted.gpg.d/linrunner-tlp.gpg --keyring /etc/apt/trusted.gpg.d/mactel-support-ppa.gpg --keyring /etc/apt/trusted.gpg.d/me-davidsansome-clementine.gpg --keyring /etc/apt/trusted.gpg.d/michael-gruz-canon-trunk.gpg --keyring /etc/apt/trusted.gpg.d/michael-gruz-canon.gpg --keyring /etc/apt/trusted.gpg.d/moka-stable.gpg --keyring /etc/apt/trusted.gpg.d/numix-ppa.gpg --keyring /etc/apt/trusted.gpg.d/nuvola-player-builders-beta.gpg --keyring /etc/apt/trusted.gpg.d/otto-kesselgulasch-gimp-edge.gpg --keyring /etc/apt/trusted.gpg.d/scopes-packagers-ppa.gpg --keyring /etc/apt/trusted.gpg.d/shutter-ppa.gpg --keyring /etc/apt/trusted.gpg.d/steam.gpg --keyring /etc/apt/trusted.gpg.d/sukso96100-budgie-desktop.gpg --keyring /etc/apt/trusted.gpg.d/ubuntu-sdk-team-ppa.gpg --keyring /etc/apt/trusted.gpg.d/ubuntu-x-swat-x-updates.gpg --keyring /etc/apt/trusted.gpg.d/vajdics-netbeans-installer.gpg --keyring /etc/apt/trusted.gpg.d/webupd8team-atom.gpg --keyring /etc/apt/trusted.gpg.d/webupd8team-brackets.gpg --keyring /etc/apt/trusted.gpg.d/webupd8team-java.gpg --keyring /etc/apt/trusted.gpg.d/webupd8team-sublime-text-3.gpg --keyring /etc/apt/trusted.gpg.d/webupd8team-themes.gpg --keyring /etc/apt/trusted.gpg.d/webupd8team-y-ppa-manager.gpg --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
gpg: keyblock resource `/etc/apt/trusted.gpg.d/webupd8team-sublime-text-3.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/webupd8team-themes.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/webupd8team-y-ppa-manager.gpg': resource limit
gpg: requesting key 437D05B5 from hkp server keyserver.ubuntu.com
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

我可以看到unchanged: 1
我也尝试使用y-ppa-manager那也没有解决问题。

是什么导致这些错误,我该如何解决?


@Waaaaaaat是的。我也会请哥哥投票。因此,将有80分。:-)
尼卡比曹

@Whaaaaaat数学是如此困难...哈哈哈!:-)不,这不是欺诈。
尼卡比曹

Answers:


37

对我来说,这似乎是以下错误

怎么修

来自在错误报告中修复它的用户:

对我有用的解决方案是清空/etc/apt/trusted.gpg.d,运行apt-get update,然后使用apt-key手动将其阻塞的每个密钥添加到主/etc/apt/trusted.gpg密钥环中。如上所述的副词。

因此,根据您的情况,您应该执行以下操作(免责声明:无法对其进行测试):

sudo mv /etc/apt/trusted.gpg.d/ /etc/apt/trusted.gpg.d.backup
sudo mkdir /etc/apt/trusted.gpg.d
sudo chmod 755 /etc/apt/trusted.gpg.d

然后,对于每个键,您需要:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5

在其中您用所需键的哈希值替换哈希值。正如IonicăBizău所指出的,可以添加多个键,并以空格分隔。

为什么出现

显然,gpg只能处理有限数量的密钥环,而您的安装需要更多。可能是由于具有许多备用数据包源引起的。

同样,从错误报告中:

I asked about the "resource limit" message on the gnupg-users mailing list...
Based on Werner Koch's (the dev) answer...
...the secure apt related programs might be making gpg use more than the maximum number of keyrings that it can handle

3
+1,似乎可以工作。请注意,它--recv-keys支持用空格分隔的值。因此,一个命令带有所有键。另外,您能否在答案中包括为什么出现此问题?
尼卡比曹

完成,谢谢您的好建议!让我知道是否还有更多的遗失。
noleti 2014年

1
清晰表达的答案。我使用Y-PPA-Manager而不是手动添加所有键,它很吸引人。我现在能够正常更新和安装软件(包括在Ubuntu Software Center和Software Updater中)。=)
Tamsyn Michael

1

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [MISSING KEY] 为我工作。

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A040830F7FAC5991
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.cmBVPKdUNm --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys A040830F7FAC5991
gpg: requesting key 7FAC5991 from hkp server keyserver.ubuntu.com
gpg: key 7FAC5991: public key "Google, Inc. Linux Package Signing Key <linux-packages-keymaster@google.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1

这个答案解决了我的问题!
Tactopoda
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.