How to fix the problem with Sury Php in Debian

If you have problem try to adding a new version of php with the command: v-add-web-php [version] and can’t install is because gpg is expired.

Only you need is:
cat /etc/apt/sources.list.d/php.list

0 deb [arch=amd64 signed-by=/usr/share/keyrings/sury-keyring.gpg] https://packages.sury.org/php/ bullseye main

And replace sury-keyring.gpg with a newest key:
wget -O /usr/share/keyrings/surykeyring.gpg https://packages.sury.org/php/apt.gpg

And you got it

See also:

1 Like