Failed apt update php

Recently had an issue being unable to update installed versions of php.
After doing an apt update i would receive the following error message

Err:4 https://packages.sury.org/php buster InRelease
 The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>

Looking at the error message it looks as if the GPG key has expired. After following https://dietpi.com/phpbb/viewtopic.php?t=8825 i did the following, downloaded the new key and updated apt and all worked fine.

wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
apt update

Leave a comment

Your email address will not be published. Required fields are marked *