无法在 Fedora Workstation 39 上安装 MySQL 8

无法在 Fedora Workstation 39 上安装 MySQL 8

通过VirtualBox已安装Fedora Workstation 39。现在我尝试安装MySQL 8服务器。我mysql80-community-release-fc39-1.noarch.rpm从那里得到了文件https://dev.mysql.com/downloads/关于本MySQL Yum Repository

好被处决了

sudo rpm -Uvh mysql80-community-release-fc39-1.noarch.rpm 
warning: mysql80-community-release-fc39-1.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql80-community-release-fc39-1 ################################# [100%]

sudo dnf install mysql-community-server
MySQL 8.0 Community Server                                                                                                  310 kB/s | 209 kB     00:00    
MySQL Connectors Community                                                                                                   60 kB/s |  12 kB     00:00    
MySQL Tools Community                                                                                                        60 kB/s |  81 kB     00:01    
Dependencies resolved.
============================================================================================================================================================
 Package                                         Architecture            Version                                   Repository                          Size
============================================================================================================================================================
Installing:
 mysql-community-server                          x86_64                  8.0.35-10.fc39                            mysql80-community                   20 M
     replacing  mariadb-connector-c-config.noarch 3.3.5-2.fc39
Installing dependencies:
 mecab                                           x86_64                  0.996-5.fc39                              fedora                             356 k
 mysql-community-client                          x86_64                  8.0.35-10.fc39                            mysql80-community                  3.7 M
 mysql-community-client-plugins                  x86_64                  8.0.35-10.fc39                            mysql80-community                  1.3 M
 mysql-community-common                          x86_64                  8.0.35-10.fc39                            mysql80-community                  557 k
 mysql-community-icu-data-files                  x86_64                  8.0.35-10.fc39                            mysql80-community                  2.3 M
 mysql-community-libs                            x86_64                  8.0.35-10.fc39                            mysql80-community                  1.5 M
Installing weak dependencies:
 mecab-ipadic                                    x86_64                  2.7.0.20070801-28.fc39                    fedora                              10 M
 mecab-ipadic-EUCJP                              x86_64                  2.7.0.20070801-28.fc39                    fedora                             9.6 M

Transaction Summary
============================================================================================================================================================
Install  9 Packages

Total download size: 50 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): mecab-0.996-5.fc39.x86_64.rpm                                                                                        231 kB/s | 356 kB     00:01    
(2/9): mecab-ipadic-2.7.0.20070801-28.fc39.x86_64.rpm                                                                       3.7 MB/s |  10 MB     00:02    
(3/9): mysql-community-client-8.0.35-10.fc39.x86_64.rpm                                                                     2.3 MB/s | 3.7 MB     00:01    
(4/9): mysql-community-common-8.0.35-10.fc39.x86_64.rpm                                                                     2.7 MB/s | 557 kB     00:00    
(5/9): mysql-community-client-plugins-8.0.35-10.fc39.x86_64.rpm                                                             1.8 MB/s | 1.3 MB     00:00    
(6/9): mysql-community-icu-data-files-8.0.35-10.fc39.x86_64.rpm                                                             3.8 MB/s | 2.3 MB     00:00    
(7/9): mysql-community-libs-8.0.35-10.fc39.x86_64.rpm                                                                       2.9 MB/s | 1.5 MB     00:00    
(8/9): mecab-ipadic-EUCJP-2.7.0.20070801-28.fc39.x86_64.rpm                                                                 2.2 MB/s | 9.6 MB     00:04    
(9/9): mysql-community-server-8.0.35-10.fc39.x86_64.rpm                                                                     8.1 MB/s |  20 MB     00:02    
------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                       6.8 MB/s |  50 MB     00:07     
MySQL 8.0 Community Server                                                                                                  3.0 MB/s | 3.1 kB     00:00    
Importing GPG key 0xA8D3785C:
 Userid     : "MySQL Release Engineering <[email protected]>"
 Fingerprint: BCA4 3417 C3B4 85DD 128E C6D4 B7B3 B788 A8D3 785C
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023
Is this ok [y/N]: y
Key imported successfully
MySQL 8.0 Community Server                                                                                                  365 kB/s | 3.1 kB     00:00    
Importing GPG key 0x3A79BD29:
 Userid     : "MySQL Release Engineering <[email protected]>"
 Fingerprint: 859B E8D7 C586 F538 430B 19C2 467B 942D 3A79 BD29
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
Is this ok [y/N]: y
error: Certificate 467B942D3A79BD29:
  The certificate is expired: The primary key is not live
Key import failed (code 2). Failing package is: mysql-community-client-8.0.35-10.fc39.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
Public key for mysql-community-client-plugins-8.0.35-10.fc39.x86_64.rpm is not installed. Failing package is: mysql-community-client-plugins-8.0.35-10.fc39.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
Public key for mysql-community-common-8.0.35-10.fc39.x86_64.rpm is not installed. Failing package is: mysql-community-common-8.0.35-10.fc39.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
Public key for mysql-community-icu-data-files-8.0.35-10.fc39.x86_64.rpm is not installed. Failing package is: mysql-community-icu-data-files-8.0.35-10.fc39.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
Public key for mysql-community-libs-8.0.35-10.fc39.x86_64.rpm is not installed. Failing package is: mysql-community-libs-8.0.35-10.fc39.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
Public key for mysql-community-server-8.0.35-10.fc39.x86_64.rpm is not installed. Failing package is: mysql-community-server-8.0.35-10.fc39.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023, 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

如何解决这种情况?

答案1

该错误表明存储库的 GPG 密钥无效,因为证书已过期/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022。它于 2022 年 10 月到期。

由于某种原因,自 2023 年 11 月以来有效的最新版本被视为无效,即使您y在命令期间回答时正确导入了该版本:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023

这似乎是一个错误。您可以通过 编辑第一部分下的/etc/yum.repos.d/mysql-community.repo行来禁用 GPG 签入来解决这个问题,使其看起来像这样gpgcheck0[mysql80-community]

[mysql80-community]
name=MySQL 8.0 Community Server
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/fc/$releasever/$basearch
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023

这将禁用它,直到您将其设置回1问题解决时为止。

您也可以只安装该软件包

dnf --nogpgcheck install mysql-community-server

但是,该方法将要求您--nogpgcheck每次都使用交换机单独更新它。

仅当您坚持从mysql-community存储库安装它时才需要这样做。

您还可以使用以下命令从 Fedora 存储库安装它,而无需添加该存储库:

dnf install community-mysql-server

这是具有相同功能的相同主要版本,并且不需要任何有关 GPG 密钥的信息。一些配置文件可能有所不同,但没有什么大不了的。

相关内容