apt update でエラー発生
N: Repository 'http://deb.debian.org/debian bookworm InRelease' changed its 'Version' value from '12.11' to '12.13'
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 bookworm InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Failed to fetch https://packages.sury.org/php/dists/bookworm/InRelease The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Some index files failed to download. They have been ignored, or old ones used instead.
エラー解消方法
sudo rm -f /etc/apt/trusted.gpg.d/sury.gpg
sudo rm -f /usr/share/keyrings/sury-php.gpg
curl -fsSL https://packages.sury.org/php/apt.gpg | \
sudo gpg --dearmor -o /usr/share/keyrings/sury-php.gpg
php.list を書き換える
vi /etc/apt/sources.list.d/php.list
deb [signed-by=/usr/share/keyrings/sury-php.gpg] https://packages.sury.org/php/ bookworm main
確認
apt update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 http://security.debian.org bookworm-security InRelease
Get:4 https://packages.sury.org/php bookworm InRelease [6,133 B]
Get:5 https://packages.sury.org/php bookworm/main amd64 Packages [281 kB]
Fetched 281 kB in 1s (492 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
180 packages can be upgraded. Run 'apt list --upgradable' to see them.
エラーが出なくなった。