报错信息:
warning: /var/cache/dnf/mysql57-community-65b9ecb4cc6a2553/packages/mysql-community-client-5.7.41-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
MySQL 5.7 Community Server 5.7 MB/s | 5.8 kB 00:00
GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql (0x5072E1F5) is already installed
The GPG keys listed for the "MySQL 5.7 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-client-5.7.41-1.el7.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Public key for mysql-community-common-5.7.41-1.el7.x86_64.rpm is not installed. Failing package is: mysql-community-common-5.7.41-1.el7.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Public key for mysql-community-libs-5.7.41-1.el7.x86_64.rpm is not installed. Failing package is: mysql-community-libs-5.7.41-1.el7.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Public key for mysql-community-server-5.7.41-1.el7.x86_64.rpm is not installed. Failing package is: mysql-community-server-5.7.41-1.el7.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: GPG check FAILED
解决方案:
GPG验证不通过,我理解是本机配置的这个软件包对应的公钥不对,签名验证失败。(我也不知道这个公钥是在安装过程哪一步自动配置的)。我在mysql官网搜关键字GPG,找到了解决方案,大意是如果使用的4.1以上版本的rpm的话,除了import mysql的公钥到个人用户的配置中,还需要import mysql的公钥到RPM的配置中。
rpm支持URL加载
$> rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
原文链接:https://blog.csdn.net/weixin_39709920/article/details/123041483