Skip to content

Instantly share code, notes, and snippets.

@VincentLoy
Last active April 12, 2024 02:12
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save VincentLoy/d8e4b73d800e59c270f8f7447477322e to your computer and use it in GitHub Desktop.
Save VincentLoy/d8e4b73d800e59c270f8f7447477322e to your computer and use it in GitHub Desktop.
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
Err:19 https://packages.sury.org/php stretch InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
Ign:26 http://ftp.au.debian.org/debian stretch InRelease
Hit:27 http://ftp.au.debian.org/debian stretch Release
Fetched 456 kB in 2s (189 kB/s)
Reading package lists... Done
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.
$ sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
--2019-05-28 14:01:05-- https://packages.sury.org/php/apt.gpg
Resolving packages.sury.org (packages.sury.org)... 104.31.95.169, 104.31.94.169, 2606:4700:30::681f:5ea9, ...
Connecting to packages.sury.org (packages.sury.org)|104.31.95.169|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1769 (1.7K) [application/octet-stream]
Saving to: ‘/etc/apt/trusted.gpg.d/php.gpg’
/etc/apt/trusted.gp 100%[===================>] 1.73K --.-KB/s in 0s
2019-05-28 14:01:05 (29.1 MB/s) - ‘/etc/apt/trusted.gpg.d/php.gpg’ saved [1769/1769]
$ sudo apt-get update
@aleblanc
Copy link

aleblanc commented Apr 1, 2024

I have the same error with bookworm :

Err:7 https://packages.sury.org/php bookworm InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743

I have fix this issue with this solution :
https://packages.sury.org/php/README.txt

sudo curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
sudo dpkg -i /tmp/debsuryorg-archive-keyring.deb
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt-get update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment