Sytko's picture

When executing a command

apt-get update 

error

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.

How to fix ?

 

 

Forum: 
Jeremy Davis's picture

Looking at the Nextcloud app build code, the alternate PHP apt repo shouldn't be configured by default?! So I'm not really clear where this error is coming from. Or did you add the sury.org repo yourself?

Bottom line, the error is almost certainly occurring because the public signing key for the sury.org repo has been rotated. So you will need to do one of 2 things:

1. Disable the sury.org repo for now.

The best way to do that will depend on how it's set up. Either rename the file (if it's defined in file of it's own, which is likely if it was supplied by turnkey) so it has an alternate/additional file-extension (I usually append "disabled", e.g. rename "some-repo.list" to "some-repo.list.disabled". Otherwise you can just comment out the line in the particular sources.list file that includes it (i.e. put a "#" at the start of the line).

if you have no idea, then you can find the file that it's in like this:

grep -r packages.sury.org /etc/apt

2. Update the GPG key which it's signed with (so you can install from it).

Again, how to do that will depend on how it's set up. If you have no idea about that (which I'm guessing is the case) then please post back with the output of the above grep command and I'll guide you in the right direction.

Sytko's picture

/etc/apt/sources.list.d/php.list:deb https://packages.sury.org/php/ stretch main
Jeremy Davis's picture

Could you please post the full error message and a few notes on what you did to get to where you are. Thanks.

Add new comment