How To Fixing GPG Keys Verification in My OS / Ubuntu

Case (For example : After “sudo apt-get update”) :

Reading package lists... Done
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://deb.opera.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E585066A30C18A2B
W: GPG error: http://ppa.launchpad.net oneiric Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 608BF7B93528AE20
dnd@riyaniezt:~$

The fix for this is to re-download the keys using the hexidecimal numbers given in the error.

Run the following in your terminal,

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 
sudo apt-get update

And then add the hexadecimal numbers to the command (again, these are my keys from my error. Make sure to use your own):

dnd@riyaniezt:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A040830F7FAC5991
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.9wjHqR8dZe --trustdb-name /etc/apt/trustdb.gpg --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: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1
dnd@riyaniezt:~$

And then executed the following commands in terminal:

dnd@riyaniezt:~$ sudo apt-get update

NOTE: Your hexadecimal numbers may be different then mine, so make sure to use the hexadecimals numbers in your error, not mine.

References:

  1. How do I fix the GPG error “NO_PUBKEY” without terminal?
  2. GPG error: The following signatures couldn’t be verified because the public key is not available [duplicate]

Leave a Reply

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