PR

apt update で GPG エラーが発生

いつものようにapt updateを実行。

# apt update

ところがエラーが発生してリポジトリの更新がうまくいかない。内容を見るに先日PHP7.3導入のために追加した packages.sury.org へのアクセスでGPGエラーが発生しているようだ。

Get:7 https://packages.sury.org/php stretch InRelease [6,760 B]
Err:7 https://packages.sury.org/php stretch InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
Fetched 6,760 B in 1s (3,694 B/s)
Reading package lists… Done
Building dependency tree
Reading state information… Done
All packages are up to date.
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 stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
W: 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
W: Some index files failed to download. They have been ignored, or old ones used instead.

どうしたものか調べていくとこのあたりのサイトが参考になった。

Failed to fetch https://packages.sury.org/php/dists/jessie/InRelease - Jesús Amieiro
W: An error occurred during the signature verification. The repository is not updated and the previo...
Just a moment...

原因であるGPGファイルを更新。

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

改めて apt update を実行で無事成功。

コメント