10
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

GPGキーの関係でmysqlがインストールできない時の対処法

Last updated at Posted at 2022-06-08

現象

mySQLをインストールする際に、下記エラー文が出てくる。

Public key for mysql-community-libs-compat-5.7.38-1.el7.x86_64.rpm is not installed 

 Failing package is: mysql-community-libs-compat-5.7.38-1.el7.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

原因

yumを使用する際に、パッケージに変更点があるか確認するためにGPGキーを使用されいているのですが、GPGキーには有効期限が設定されており、期限が切れてしまうとGPGキーとしての役割を果たさなくなってしまいます。

対策

新しくGPGキーをインストールすればyumが使えるようになります!

sudo rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022

結果

mysqlのインストールが出来ました!

Installed:
  mysql-community-libs.x86_64 0:5.7.38-1.el7
  mysql-community-libs-compat.x86_64 0:5.7.38-1.el7
  mysql-community-server.x86_64 0:5.7.38-1.el7

Dependency Installed:
  mysql-community-client.x86_64 0:5.7.38-1.el7
  mysql-community-common.x86_64 0:5.7.38-1.el7
  ncurses-compat-libs.x86_64 0:6.0-8.20170212.amzn2.1.3

Replaced:
  mariadb-libs.x86_64 1:5.5.68-1.amzn2

Complete!
10
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?