我目前正在尝试在 ec2 中安装 mysql,但“GPG key”错误不断发生。
[root ec2-user]# sudo yum install mysql-community-server
Last metadata expiration check: 3:41:39 ago on Thu Jan 25 23:25:24 2024.
Dependencies resolved.
===================================================================================================
Package Arch Version Repository Size
===================================================================================================
Installing:
mysql-community-server x86_64 8.0.36-1.el9 mysql80-community 49 M
Installing dependencies:
mysql-community-client x86_64 8.0.36-1.el9 mysql80-community 3.4 M
mysql-community-client-plugins x86_64 8.0.36-1.el9 mysql80-community 1.4 M
mysql-community-common x86_64 8.0.36-1.el9 mysql80-community 556 k
mysql-community-icu-data-files x86_64 8.0.36-1.el9 mysql80-community 2.3 M
mysql-community-libs x86_64 8.0.36-1.el9 mysql80-community 1.4 M
Transaction Summary
===================================================================================================
Install 6 Packages
Total size: 58 M
Installed size: 334 M
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] mysql-community-client-8.0.36-1.el9.x86_64.rpm: Already downloaded
[SKIPPED] mysql-community-client-plugins-8.0.36-1.el9.x86_64.rpm: Already downloaded
[SKIPPED] mysql-community-common-8.0.36-1.el9.x86_64.rpm: Already downloaded
[SKIPPED] mysql-community-icu-data-files-8.0.36-1.el9.x86_64.rpm: Already downloaded
[SKIPPED] mysql-community-libs-8.0.36-1.el9.x86_64.rpm: Already downloaded
[SKIPPED] mysql-community-server-8.0.36-1.el9.x86_64.rpm: Already downloaded
MySQL 8.0 Community Server 3.0 MB/s | 3.1 kB 00:00
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.36-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.36-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-client-plugins-8.0.36-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.36-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-common-8.0.36-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.36-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-icu-data-files-8.0.36-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.36-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-libs-8.0.36-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.36-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-server-8.0.36-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 'yum clean packages'.
Error: GPG check FAILED
Run Code Online (Sandbox Code Playgroud)
在另一篇 Stack Overflow 文章中:
sudo rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
Run Code Online (Sandbox Code Playgroud)
我看到一个帖子要求我输入这个命令。
所以即使我输入这个并再次安装,
sudo yum install mysql-community-server
Run Code Online (Sandbox Code Playgroud)
但同样的错误仍然发生。
是哪一部分出了问题?
请帮我..
[root@ ec2-user]# cat /etc/os-release
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
SUPPORT_END="2028-03-15"
Run Code Online (Sandbox Code Playgroud)
现在一个实际的答案。
跑步:
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2023
Run Code Online (Sandbox Code Playgroud)
注意“ 2023 ”
显然他们更新了 GPG 密钥...从未找到任何对此的参考,只是尝试了该命令,它起作用了。
| 归档时间: |
|
| 查看次数: |
1060 次 |
| 最近记录: |