Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to trust a apt repository : Debian apt-get update error public key is not available: NO_PUBKEY <id> [closed]

Trying to update some repositories on Debian Etch installation and getting the following errors from running "apt-get update"

W: GPG error: http://www.debian-multimedia.org etch Release: The following signatures couldn't be verified because teh public key is not available: NO_PUBKEY 07DC563D1F41B907 W: You may want to run apt-get update to correct these problems 

The irony of it instructing me to run apt-get update is a nice kicker...

like image 709
Chris Harris Avatar asked Jul 16 '09 17:07

Chris Harris


People also ask

What is GPG error in Ubuntu?

The Ubuntu 22.04 GPG error: The following signatures couldn't be verified is the most common error when attempting to include third party package repositories to the apt package manager. The GPG error should rather be treated as a warning against potential package installation from unknown sources.

What is apt-key in Debian?

apt-key can be used to show the keys in the keyring, and to add or remove a key. In more recent Debian GNU/Linux versions (Wheezy, for example), the keyrings are stored in specific files all located in the /etc/apt/trusted. gpg. d directory.

What does sudo apt get upgrade do?

You run sudo apt-get upgrade to install available upgrades of all packages currently installed on the system from the sources configured via sources. list file. New packages will be installed if required to satisfy dependencies, but existing packages will never be removed.


1 Answers

I found several posts telling me to run several gpg commands, but they didn't solve the problem because of two things. First, I was missing the debian-keyring package on my system and second I was using an invalid keyserver. Try different keyservers if you're getting timeouts!

Thus, the way I fixed it was:

apt-get install debian-keyring gpg --keyserver pgp.mit.edu --recv-keys 1F41B907 gpg --armor --export 1F41B907 | apt-key add - 

Then running a new "apt-get update" worked flawlessly!

like image 145
Chris Harris Avatar answered Sep 22 '22 15:09

Chris Harris