Nasser Heidari


apt-get complain “The following signatures couldn’t be verified because the public key is not available”

Filed under: Linux — Nasser Heidari @ 04:40

If you happen to upgrade using apt-get and get the following error:

# apt-get update
Fetched 18.7kB in 3s (5301B/s)
Reading package lists... Done
W: GPG error: stable/non-US Release: The following signatures couldn't be verified 
because the public key is not available: NO_PUBKEY F1D53D8C4F368D5D W: You may want to run apt-get update to correct these problems

It means that your APT doesn’t have needed the public key. In the example above, finger print of the public key is
F1D53D8C4F368D5D. To remedy the problem, you should do the following:

# gpg --keyserver --recv-keys F1D53D8C4F368D5D
gpg: requesting key 4F368D5D from hkp server
gpg: key 4F368D5D: public key "Debian Archive Automatic Signing Key (2005) " imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1

# gpg --armor --export F1D53D8C4F368D5D | apt-key add -

Have a nice hacking ;)