问题形容
centos7 装置 mysql5.7 时遇到一个诡异的问题
sudo yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
sudo yum install mysql-community-server
而后遇到了上面的问题 Public key for mysql-community-libs-compat-xxx.rpm is not installed
具体输入如下
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/9): libaio-0.3.109-13.el7.x86_64.rpm | 24 kB 00:00:00
warning: /var/cache/yum/x86_64/7/mysql57-community/packages/mysql-community-common-5.7.37-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Public key for mysql-community-common-5.7.37-1.el7.x86_64.rpm is not installed
(2/9): mysql-community-common-5.7.37-1.el7.x86_64.rpm | 311 kB 00:00:00
(3/9): mysql-community-libs-5.7.37-1.el7.x86_64.rpm | 2.4 MB 00:00:00
(4/9): mysql-community-libs-compat-5.7.37-1.el7.x86_64.rpm | 1.2 MB 00:00:00
(5/9): openssl-1.0.2k-24.el7_9.x86_64.rpm | 494 kB 00:00:00
(6/9): openssl-libs-1.0.2k-24.el7_9.x86_64.rpm | 1.2 MB 00:00:00
(7/9): postfix-2.10.1-9.el7.x86_64.rpm | 2.4 MB 00:00:00
(8/9): mysql-community-client-5.7.37-1.el7.x86_64.rpm | 25 MB 00:00:01
(9/9): mysql-community-server-5.7.37-1.el7.x86_64.rpm | 174 MB 00:00:16
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 12 MB/s | 207 MB 00:00:16
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Importing GPG key 0x5072E1F5:
Userid : "MySQL Release Engineering <mysql-build@oss.oracle.com>"
Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5
Package : mysql57-community-release-el7-11.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Is this ok [y/N]: y
Public key for mysql-community-libs-compat-5.7.37-1.el7.x86_64.rpm is not installed
Failing package is: mysql-community-libs-compat-5.7.37-1.el7.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
解决形式:
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
胜利就点个赞吧,谢谢。