Linux – Why does apt-get update tell me to run apt-get update

aptdebiangpglinux

So I have this going on:

# apt-get update
Get:1 http://ftp.us.debian.org etch Release.gpg [1032B]                     
Hit http://ftp.us.debian.org etch Release                                        
(...bunch more of this elided...)
Hit http://ftp.us.debian.org etch/contrib Sources
Fetched 68.8kB in 1s (37.4kB/s)
Reading package lists... Done
W: There is no public key available for the following key IDs:
9AA38DCD55BE302B
W: GPG error: http://ftp.us.debian.org etch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B
W: You may want to run apt-get update to correct these problems

Apparently I can't run apt-get update because of a problem that apt-get wants me to run apt-get update to fix, which is displeasing. How do I correct this?

Best Answer

Try doing this and running apt-get again:

apt-key update

apt-key is a program that is used to manage a keyring of gpg keys for secure apt. The keyring is kept in the file /etc/apt/trusted.gpg (not to be confused with the related but not very interesting /etc/apt/trustdb.gpg). apt-key can be used to show the keys in the keyring, and to add or remove a key.

Further info on the Debian wiki: http://wiki.debian.org/SecureApt

If that doesn't work, try:

gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 9AA38DCD55BE302B
apt-key add /root/.gnupg/pubring.gpg
apt-get update