9to6linux.com
Covering latest Linux News, Tutorials, Reviews and more

How to resolve the 'signature could not be verified' error in Linux

Did you just encounter an error in your Ubuntu variant that says that the signature of a specific PUBKEY not verified? Here's the quick solution. - Article by Editor (9to6linux) on

How to resolve the 'signature could not be verified' error in Linux

How to resolve the 'signature could not be verified' error in Linux

Did you just encounter an error in your Ubuntu variant that says that the signature of a specific PUBKEY not verified? Here's the quick solution.

If you are using Ubuntu or its any successors, you may encounter an error "Could not download all repository indexes" while updating the system. The error message may describe as "GPG error: The following signatures couldn't be verified because the public key is not available".

If you encountered this error, don't worry! In this quick post, we will learn how to fix the "GPG error: The following signatures couldn’t be verified because the public key is not available". Follow the simple mentioned steps as detailed here.

How to fix GPG error: The following signatures couldn’t be verified

The above-mentioned error tells you that your system was not able to identify a set of GPG public keys (PUBKEY) as shown in the error message. To resolve this, you will need to fetch and add that public key to your system repository cache.

To fetch and add the public key <PUBKEY> to your system open the Linux Terminal and enter the following command:

$ sudo apt key adv --keyserver hkp://keserver.ubuntu.com:80 --recv-keys [PUBKEY]

How to add a public key [PUBKEY] to your Linux system

This will add the PUBKEY to your system.

WARNING!
Never blindly add the public key [PUBKEY] to your system. Check the repository page of the application for which you received this error to confirm that the said [PUBKEY] is actually from the developer.

How to verify that a PUBKEY successfully added to the Linux system

As we have just learned how to add a public key [PUBKEY] to your Ubuntu Linux variant, now it's time to check whether that [PUBKEY] successfully added to the system. To verify it, open your Linux Terminal and add the following command:

$ apt-key list

How to verify that a public key [PUBKEY] added to your Linux system

After executing the above command, it will list all the public keys attached to your system. Now, verify in the list whether your [PUBKEY] is present. If you can find it listed there, as shown in the above screenshot, you are good to go.