【LINUX】yum updateで「GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql」エラー対応方法

2022-01-19 09:21 250 0

mysql 8.0がインストールされているamazon Linux2 で yum update したら以下のエラーが発生!!


Downloading packages:

警告: /var/cache/yum/x86_64/2/mysql80-community/packages/mysql-community-server-8.0.28-1.el7.x86_64.rpm: ヘッダー V4 RSA/SHA256 Signature、鍵 ID XXXXXXXX: NOKEY

file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql から鍵を取得中です。


The GPG keys listed for the "MySQL 8.0 Community Server" repository are already installed but they are not correct for this package.

Check that the correct key URLs are configured for this repository.


Failing package is: mysql-community-server-8.0.28-1.el7.x86_64

GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql




以下を実行後、yum update すると問題なく進む。

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022