Fixing: ... Public Key is Not Available on Apt Update

Sometimes when installing software you might encounter an error: signatures could not be verified. This is how to solve it.

1229 views
d

By. Jacob

Edited: 2018-02-06 12:47

When I was adding the Samsung Unified Linux for my Samsung laser printer, and tried running sudo apt update which resulted in an error stating the signatures could not be verified, since the public key is not available (NO_PUBKEY).

The error is caused by a missing key in the system. Apparently there is a set of pre-configured keys in the system, and when you install software from third parties, you may run into this problem. The problem is not dangerous, but should still be fixed.

I am not usually patient when installing software, and stuff like this is just a huge inconvenience. I prefer how things a are done in Windows, when it comes to installing software from the internet, since stuff just works out-of-the-box. I guess Linux has a lot of catching-up to do.

Anyway, had I finished reading the humongous installation instructions, I would likely not have had this problem. But, it is still strange that it is even necessary in the first place.

Solving the problem

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY [SOME_RANDOM_KEY]

To fix the problem, I simply added the key manually using the below command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [KEY]

When you see the error in the terminal, simply copy the key from the error, and add it to the above command. The next time you run apt update you should no longer see the error.

Tell us what you think:

  1. Understanding file permissions in Unix / Linux based systems, and how to make files immutable.
  2. How to search a directory and subdirectories for a given string of text in Linux with the grep command.
  3. Worth knowing in order to make a bootable USB memory stick with Windows on from Linux.
  4. This is why I decided to encrypt my new Flash Drive, and why I think you should too.
  5. About the problem with using sudo with graphical programs in Linux.

More in: Linux Tutorials