Debian updates failing: public keys not available
Posted: Tue Jun 13, 2023 3:08 pm
For those who have noticed, updates to Debian have been failing for the last several days:
To correct, run the following:
Results:
Note: there may be other solutions to this problem, but the information currently available on the "Internet" on this matter is either stale or misleading or way too involved, and all of them ultimately ended up being dead ends. By trial and error, the above is the simplest solution. It works for both Buster and Bullseye implementations.
Code: Select all
$: sudo apt update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Get:3 http://httpredir.debian.org/debian buster-backports InRelease [51.4 kB]
Err:3 http://httpredir.debian.org/debian buster-backports InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://httpredir.debian.org/debian buster-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131
W: Failed to fetch http://httpredir.debian.org/debian/dists/buster-backports/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131
W: Some index files failed to download. They have been ignored, or old ones used instead.
Code: Select all
rpi-rw
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0E98404D386FA1D9
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6ED0E7B82643E131
Code: Select all
$: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0E98404D386FA1D9
Executing: /tmp/apt-key-gpghome.69Hpr6Z4Ax/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0E98404D386FA1D9
gpg: key 73A4F27B8DD47936: public key "Debian Archive Automatic Signing Key (11/bullseye) <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1
$: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6ED0E7B82643E131
Executing: /tmp/apt-key-gpghome.CFyZq9HgFw/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6ED0E7B82643E131
gpg: key B7C5D7D6350947F8: public key "Debian Archive Automatic Signing Key (12/bookworm) <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1