By using this site you agree to the use of cookies.

Learn more

Share via:

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.

156 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.

Comments