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

相关推荐
greasyfork6 分钟前
多种数据库管理混乱?Navicat Premium 17 for Mac 统一解决
数据库·mysql·macos·mac
Dream_fly_iboy32 分钟前
系统架构设计师之数据库
数据库
风和先行1 小时前
Android 数据库相关学习总结
android·数据库·学习
宠友信息1 小时前
Spring Boot与异步审核构建仿小红书源码内容发布全流程
java·数据库·spring boot·redis·mysql·oracle·uni-app
2401_873479402 小时前
如何识别代理IP和伪装流量?用IP情报工具三步穿透住宅代理伪装
网络·数据库·网络协议·tcp/ip·ip
诚信定制8392 小时前
如何启动 Redis 服务:详细步骤指南
数据库·redis·缓存
AllData公司负责人2 小时前
数据同步平台|AIIData数据中台实现MySQL、Hive、Kafka 一键接入Doris
大数据·数据库·hive·mysql·kafka·实时同步
数据库小学妹2 小时前
MySQL安全加固全流程:网络隔离、TDE加密、数据脱敏、等保合规7步实战
mysql·安全·数据脱敏·审计日志·安全加固·等保合规
Edward111111112 小时前
一AI名词
java·开发语言·数据库·学习
hey you~2 小时前
400电话选型技术测评:一个开发视角的线路质量评估方案
运维·网络·数据库·400电话·企业通信