MySQL 官方 GPG 密钥过期问题

Almalinux下安装mysql8:

dnf install -y https://dev.mysql.com/get/mysql80-community-release-el9-1.noarch.rpm

dnf install -y mysql-community-server

不幸收获报错:

MySQL 8.0 Community Server

GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022 (0x3A79BD29) is already installed

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-client-8.0.46-1.el9.x86_64

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

Public key for mysql-community-client-plugins-8.0.46-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-client-plugins-8.0.46-1.el9.x86_64

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

Public key for mysql-community-common-8.0.46-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-common-8.0.46-1.el9.x86_64

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

Public key for mysql-community-icu-data-files-8.0.46-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-icu-data-files-8.0.46-1.el9.x86_64

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

Public key for mysql-community-libs-8.0.46-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-libs-8.0.46-1.el9.x86_64

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

Public key for mysql-community-server-8.0.46-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-server-8.0.46-1.el9.x86_64

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

The downloaded packages were saved in cache until the next successful transaction.

You can remove cached packages by executing 'dnf clean packages'.

Error: GPG check FAILED

之前安装都没错啊,怎么现在中奖了?

有人讲dnf install -y mysql-community-server --nogpgcheck 关闭校验就行了。然而这不是解决问题之道,绕开了坑,坑还在,迟早还得掉进行。

仔细看提示,都说了2022年的过期了,换2023年即可:

1. 导入 MySQL 最新的 GPG 密钥(2023版,解决校验失败)

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

2. 清理缓存

dnf clean all

3. 重新安装 MySQL

dnf install -y mysql-community-server

相关推荐
jaysee-sjc2 分钟前
【苍穹外卖】Day12:工作台数据看板与 Excel 报表导出
java·开发语言·数据库·spring boot·spring·微信·excel
sunburn-21 分钟前
数据库聚合查询完整教程:从基础函数到实战统计
java·数据库·mysql·数据库开发
小蒜学长42 分钟前
基于 Spring Boot 的英语单词背诵系统的设计与实现(代码+数据库+LW)
java·数据库·spring boot·后端
中电金信1 小时前
开发更高效、监控更实时、运维更省心,源启数据开发平台构筑一站式数据开发新底座
网络·数据库·人工智能
泡海椒1 小时前
深度解析JQuick-SQL 谓词下推与投影下推优化机制
数据库·sql
❀͜͡傀儡师2 小时前
MySQL REST Service 认证鉴权体系与 MySQL 26.10.0 内置化演进
数据库·mysql·adb
wifi___2 小时前
Redis分布式锁
数据库·redis·分布式
4SAPI2 小时前
营销内容生成大模型 API 生产选型指南:4SAPI、硅基流动与 OpenRouter 的架构权衡
数据库·人工智能·架构·php
zyxqyy&∞2 小时前
sqli-labs-union联合查询(Less1-Less4)
数据库·安全
数据库小学妹2 小时前
MySQL binlog格式怎么选?ROW、STATEMENT、MIXED的区别与坑
数据库·mysql·binlog·主从复制·数据一致性