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

相关推荐
天桥下的卖艺者2 小时前
使用scitable包,两步生成逆概率删失权重(IPCW)
数据库·r语言
隔窗听雨眠2 小时前
AI原生数据库浪潮:国产数据库的架构重构与路径之争
数据库
数据库小学妹2 小时前
数据库选型实战:从数据类型到TCO成本,五维决策框架+九款产品横评
数据库·信创·国产数据库·数据库选型·oracle迁移
神龙天舞20013 小时前
MySQL 备库为什么会延迟好几个小时
android·数据库·mysql
丙氨酸長鏈5 小时前
Web前端入门第 问:JavaScript 一个简单的 IndexedDB 数据库入门示例
前端·javascript·数据库
独行侠影a5 小时前
APScheduler+Redis 分布式定时任务:解决多实例任务重复执行
数据库·redis·分布式
传说故事6 小时前
数据库中一些常用英文单词含义
数据库·oracle
夏贰四6 小时前
中小企业搭建业务中台如何控成本?业务中台轻量化落地分几步实施?
数据库·业务中台
林焱RPA7 小时前
影刀RPA200篇纪念版:最实用的20个自动化场景大盘点
数据库
名字还没想好☜7 小时前
Go 的 time.After 在 select 循环里内存泄漏:定时器堆积原理与 timer.Reset 正确姿势
java·数据库·golang·go·goroutine