(Closed) Error on apt-get update (sury.org) [linux]
Asked Answered
T

4

5

I'm trying to apt-get update on my virtualmin (debian) but it fails with some package (packages.sury.org)

then I check the package with:

curl --verbose -SLO https://packages.sury.org/php/pool/main/p/pcre3/libpcre3_8.41-1+0~20170825202309.5+jessie~1.gbp97d153_amd64.deb

And it throw:

HTTP/1.1 403 Forbidden
< Date: Thu, 14 May 2020 00:37:49 GMT
< Content-Type: text/plain; charset=UTF-8
< Content-Length: 16
< Connection: keep-alive
< Set-Cookie: __cfduid=df716884f5fd8ee4d658ae79b60f1589416669; expires=Sat, 13-Jun-20 00:37:49 GMT; path=/; domain=.sury.org; HttpOnly; SameSite=Lax; Secure
< Cache-Control: max-age=15
< Expires: Thu, 14 May 2020 00:38:04 GMT
< Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
* Server cloudflare is not blacklisted
< Server: cloudflare
< CF-RAY: 59308d88e98bcd8f-CDG
< alt-svc: h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
< cf-request-id: 02b236c9940000cd8fb3200000001
< 
{ [data not shown]

How can I solve it?


Edit: Solution

apt-get install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

then run: apt-get update

That works for me! hope it helps someone in the future :)

Source: https://df.tips/t/topic/334

Tellurate answered 14/5, 2020 at 0:57 Comment(3)
Thanks for posting this. I'm getting ERROR: The certificate of ‘packages.sury.org’ is not trusted. on the wget command so can't reach the .gpg file.Toffeenosed
Please flag an answer as solution. Do not embed the solution in your question :)Statampere
Also probably not related to "linux" tag in general. We can remove that tag.Statampere
A
7

I had the same issue which was fixed by redownloading the gpg key:

wget https://packages.sury.org/php/apt.gpg

sudo apt-key add apt.gpg

After this you can update or install your packages.

Anetta answered 14/12, 2021 at 9:41 Comment(0)
C
2

For older Debian version like stretch, I solved it by adding this repository

deb http://mirror-bbg-5.internet1.de/sury-php-stretch stretch main

in the following file

/etc/apt/sources.list.d/php.list

Then added the repository key

wget -qO - https://debian.octopuce.fr/sury-php/apt.gpg | sudo apt-key add -
apt update
apt install php8.1
Creole answered 21/3, 2023 at 16:51 Comment(0)
F
0

If you have a look at packages.sury.org/php/pool/main/p/pcre3/, you can see that package

libpcre3_8.41-1+0~20170825202309.5+jessie~1.gbp97d153_amd64.deb

doesn't exist.

The current version in jessie's Packages list (amd64, 13-May-2020 07:12) is

libpcre3_8.43-1+0_20190710.6+debian8_1.gbpbfc49f_amd64.deb

Fatback answered 14/5, 2020 at 1:44 Comment(3)
I retry apt-get update and it throws: 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 jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD43Tellurate
It looks like somethings wrong with packages.sury.org Right?Tellurate
Something's wrong with the key and your package list is outdated. I'd try this script: packages.sury.org/php/README.txt (and remove the old sources list if the filename is different).Fatback
U
0

I had similar issue (inside gitlab-ci docker container drud/ddev-webserver) where error was:

The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key

To fix the error, I just download the new key:

apt-key adv --fetch-keys https://packages.sury.org/php/apt.gpg

And then run package update

apt update && apt upgrade
Unwatched answered 22/3, 2024 at 12:1 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.