Public key for mysql-community-common-8.0.33-1.el7.x86_64.rpm is not installed Failing package is: mysql-community-common-8.0.33-1.el7.x86_64 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
时间: 2024-01-31 11:33:24 浏览: 214
mysql-community-client-8.0.17-1.el7.x86_64.rpm
这个错误是由于缺少MySQL的GPG密钥导致的。您可以按照以下步骤解决该问题:
1. 从MySQL官方网站下载MySQL的GPG密钥:
```
wget https://dev.mysql.com/doc/mysql-repo-extractor/8.0/get-mysql-gpg-key.sh
chmod +x get-mysql-gpg-key.sh
./get-mysql-gpg-key.sh
```
2. 安装MySQL GPG密钥:
```
sudo rpm --import mysql_pubkey.asc
```
3. 重新安装MySQL:
```
sudo yum install mysql-server
```
4. 如果还出现 GPG 错误,可以尝试清除缓存并再次尝试安装:
```
sudo yum clean all
sudo yum install mysql-server
```
这些步骤应该可以解决 GPG 错误并安装 MySQL 8.0。
阅读全文