1

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

mentamarindo
  • 539
  • 9
  • 16
  • 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. – kub1x Apr 29 '22 at 13:34

3 Answers3

1

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.

Antoine
  • 1,393
  • 4
  • 20
  • 26
george-ax
  • 11
  • 1
1

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
Sotmir Laci
  • 84
  • 1
  • 6
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

Freddy
  • 4,548
  • 1
  • 7
  • 17
  • 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 B188E2B695BD43` – mentamarindo May 14 '20 at 03:14
  • It looks like somethings wrong with `packages.sury.org` Right? – mentamarindo May 14 '20 at 03:16
  • Something's wrong with the key and your package list is outdated. I'd try this script: [packages.sury.org/php/README.txt](https://packages.sury.org/php/README.txt) (and remove the old sources list if the filename is different). – Freddy May 14 '20 at 03:19