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.repoGPGチェックインを無効にすると、この問題を解決できます。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キーに関する情報は必要ありません。一部の設定ファイルは異なる場合がありますが、大きな問題ではありません。

おすすめ記事