HostOnNet Blog

apt-get update error signatures couldn’t be verified because the public key is not available

Looking for Linux Server Admin or WordPress Expert? We can help.

When updating ubuntu, i got following error.

root@cloud2:/etc/apt/trusted.gpg.d# apt-get update
Ign http://security.ubuntu.com trusty-security InRelease
--
--
--
--
Hit http://archive.ubuntu.com trusty-updates/universe i386 Packages
Fetched 3732 B in 3s (1035 B/s)
Reading package lists... Done
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://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://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
root@cloud2:/etc/apt/trusted.gpg.d#

This is fixed by running

apt-key adv --recv-key --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32

3B4FE6ACC0B21F32 is the key from the error message when you run apt-get update.

# apt-key adv --recv-key --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.nOwyPbbL9k --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --recv-key --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32
gpg: requesting key C0B21F32 from hkp server keyserver.ubuntu.com
gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012) <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
# 

Posted in Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.