Zum Inhalt

Debian & Ubuntu

GPG-NOPUBKEY beim Updaten der Paketquellen

Ab und zu tritt beim Updaten der Paketquellen (apt update) dieser Fehler auf:

root@heimdall:~# apt update
[...]
Hit:4 http://ftp.debian.org/debian stretch Release
Get:5 https://packages.sury.org/php stretch InRelease [6760 B]
Err:5 https://packages.sury.org/php stretch InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
Fetched 6760 B in 2s (3210 B/s)
Reading package lists...
Building dependency tree...
Reading state information...
79 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
W: Failed to fetch https://packages.sury.org/php/dists/stretch/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
W: Some index files failed to download. They have been ignored, or old ones used instead.

Wenn man dem Repository vertraut kann dieser Fehler folgendermaßen behoben werden:

  • Das Programm apt-key muss installiert sein
  • apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <signatur>

Also wie folgt:

root@heimdall:~# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B188E2B695BD4743
Executing: /tmp/apt-key-gpghome.vUlnaL4rYz/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys B188E2B695BD4743
gpg: key B188E2B695BD4743: 1 signature not checked due to a missing key
gpg: key B188E2B695BD4743: public key "DEB.SURY.ORG Automatic Signing Key <deb@sury.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1

Und apt update läuft ohne Probleme durch.