debian:Sury:apt:The following signatures couldn't be verified because the public key is not available

分類:Debian


環境: Sury packages on debian 9

apt update
output:
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 stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
Failed to fetch https://packages.sury.org/php/dists/stretch/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
Some index files failed to download. They have been ignored, or old ones used instead.

發生原因為 https://packages.sury.org/ 的 apt.gpg 於 18-Mar-2019 更新

解決方法

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

再重新執行

apt update

Tags:debian · nginx · php