Debian updates failing: public keys not available

General support for the Pi-Star System
Post Reply
KN2TOD
Posts: 273
Joined: Sun Nov 11, 2018 6:36 pm

Debian updates failing: public keys not available

Post by KN2TOD »

For those who have noticed, updates to Debian have been failing for the last several days:

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.
To correct, run the following:

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
Results:

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
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.
User avatar
RC3C
Posts: 48
Joined: Tue Mar 05, 2019 12:09 pm
Location: Moscow
Contact:

Re: Debian updates failing: public keys not available

Post by RC3C »

Good day/night, colleagues.

@KN2TOD , big thanks for this thread.

I have an experience on my DSTAR & DMR hotspots here. Both are Pi-0 devices.
When I logged to both of them, I have an error to add new public keys for getting further updates. See that:

Code: Select all

root@pistar-dmr(rw):rc3c# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6ED0E7B82643E131
gpg: relocation error: gpg: symbol ``▒▒▒▒▒▒ version GCRYPT_1.6 not defined in file libgcrypt.so.20 with link time reference
root@pistar-dmr(rw):rc3c# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0E98404D386FA1D9
gpg: relocation error: gpg: symbol ``▒▒▒▒▒▒ version GCRYPT_1.6 not defined in file libgcrypt.so.20 with link time reference
I used a command 'apt upgrade' like this:

Code: Select all

root@pistar-dmr(rw):rc3c# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  libc-bin libc-dev-bin libc-l10n libc6 libc6-dev libraspberrypi-bin libraspberrypi-dev libraspberrypi0 linux-libc-dev locales multiarch-support raspberrypi-bootloader raspberrypi-kernel
13 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/97.5 MB of archives.
After this operation, 79.9 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 46845 files and directories currently installed.)
Preparing to unpack .../libc6-dev_2.28-10+rpt2+rpi1+deb10u2_armhf.deb ...
Unpacking libc6-dev:armhf (2.28-10+rpt2+rpi1+deb10u2) over (2.28-10+rpt2+rpi1+deb10u1) ...
Preparing to unpack .../libc-dev-bin_2.28-10+rpt2+rpi1+deb10u2_armhf.deb ...
Unpacking libc-dev-bin (2.28-10+rpt2+rpi1+deb10u2) over (2.28-10+rpt2+rpi1+deb10u1) ...
Preparing to unpack .../linux-libc-dev_1%3a1.20230509~buster-1_armhf.deb ...
Unpacking linux-libc-dev:armhf (1:1.20230509~buster-1) over (1:1.20220308~buster-1) ...
Preparing to unpack .../libc6_2.28-10+rpt2+rpi1+deb10u2_armhf.deb ...
Unpacking libc6:armhf (2.28-10+rpt2+rpi1+deb10u2) over (2.28-10+rpt2+rpi1+deb10u1) ...
Setting up libc6:armhf (2.28-10+rpt2+rpi1+deb10u2) ...
(Reading database ... 46845 files and directories currently installed.)

............... etc...
Please, wait until upgrade is done.
Then you can use both commands to add new keys as KN2TOD wrote in 1st message of this thread.

Code: Select all

root@pistar-dmr(rw):rc3c# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0E98404D386FA1D9
Executing: /tmp/apt-key-gpghome.hiYGASc1Sl/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
root@pistar-dmr(rw):rc3c# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6ED0E7B82643E131
Executing: /tmp/apt-key-gpghome.Ac22c3uAVk/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
root@pistar-dmr(rw):rc3c#
So, all means that you have to upgrade the system, then add new keys. Then update command works well:

Code: Select all

root@pistar-dmr(rw):rc3c# 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]
Fetched 51.4 kB in 7s (7,815 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
root@pistar-dmr(rw):rc3c#
73! Anton aka Tony
EL #2102, EL #53698, DMR #2503041, XLX937-B
Clubs: RC5C, RY3AAL, NMDXC

Image
Image
Post Reply