11

apt-get update returns :

W: GPG error: http://pl.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://pl.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://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://deb.torproject.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EE8CBC9E886DDD89
W: GPG error: http://security.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://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://dl.google.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991

I've tried many recommended solutions from old questions but nothing seems to help.

  • sudo apt-get clean

  • sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 (with all the missing keys)

  • I installed lauchpad-getkeys which is supposed to restore keys automatically

Any ideas?

Adam
  • 1,355
  • 2
  • 15
  • 23
  • Thanks, but as mentioned, I tried --recv-keys with no luck. – Adam Sep 18 '14 at 03:46
  • Please post the output of command sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5 – sмurf Sep 18 '14 at 04:45
  • Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.ux3Y2CVCoP --no-auto-check-trustdb --trust-model always

    (trimmed list of repositories)

    gpg: keyblock resource /etc/apt/trusted.gpg.d/xorg-edgers-ppa.gpg: resource limit gpg: keyblock resource /etc/apt/trusted.gpg.d/yktooo-ppa.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

    – Adam Sep 18 '14 at 09:53
  • http://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey – isomorphismes Nov 24 '14 at 04:45
  • 1
    @isomorphismes NOPE. That particular key 40976EAF437D05B5 is extremely stubborn and hard to fix, so Q 13065 only covers the cases that the OP has tried umpteen times anyway. This is as if you gave me a Pozidriv screwdriver when I need a Torx one. ;) – syntaxerror Sep 14 '15 at 19:14
  • @syntaxerror ah ok. sorry. – isomorphismes Sep 14 '15 at 21:28
  • @isomorphismes but I've just managed to fix this stubborn key here on my machine!! There were 5 NO_PUBKEY errors, 1 of which I had to fix manually, but 4 of which I was able to fix with the simple line sudo apt-key update. The latter line also covered the 40976EA... key case. Mission completed. Note the essential albeit minor difference between apt-*key* update and apt-*get* update. – syntaxerror Sep 15 '15 at 06:46

2 Answers2

3

The apt present in Ubuntu is suffering from a gpg resource limit bug in apt

You can easily fix this going to /etc/apt/trusted.gpg.d and removing unused keys (usually from PPAs you don't use anymore) until get below 40 keys.

Then ran sudo apt-get update

2

You are probably affected by bug 1263540. I suggest you try:

  1. sudo apt-get clean
  2. sudo mv /var/lib/apt/lists /var/lib/apt/lists.old
  3. mkdir -p /var/lib/apt/lists/partial
  4. Remove any 0 lenght files in /etc/apt/trusted.gpg.d/
  5. sudo apt-get update

If it doesn't work restore /var/lib/apt/lists backed up in step 2.

Source

sмurf
  • 4,680
  • Fixed it :) Not sure if following your steps helped, because I still had the same problem afterwards. What seems to have done it is deleting yktooo-ppa.gpg in /etc/apt/trusted.gpg.d, even though it wasn't 0 length. I chose it because it came up earlier as mentionned above resource limit gpg: keyblock resource /etc/apt/trusted.gpg.d/yktooo-ppa.gpg – Adam Sep 19 '14 at 05:03
  • I have added another repository and the error has returned. Looks like it's the same bug as you linked to :( Hope they fix it soon – Adam Sep 19 '14 at 11:14