Example error message in terminal at running apt-get:
[chris@server ~]$ sudo apt-get update Ign http://security.ubuntu.com trusty-security InRelease Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B] … Fetched 21.9 MB in 14s (1,537 kB/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 [chris@server ~]$
Reading the text above, you can see for example that public key ‘3B4FE6ACC0B21F32’ can’t be found. This has to retrieved from a key server. We’re gonna fix this by running the following command:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
You’ll see that the key will be downloaded en registered. Problem solved!
Run the command apt-get upgrade again. The error message should be gone.