I am public blog

Hello word I am Public Blog

개발 서버에 mysql을 설치하려는데 다음과 같은 오류 메시지가 출력됐다.

처음 보는 오류 메시지였다.

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.28-1.el7.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

해결 방법은 mysql.repo 파일에 gpgkeys 값의 경로를 변경된 경로로 변경해 주면 된다.
(나의 경우 파일 경로는 /etc/yum.repos.d/mysql-community.repo 였다.)

$ cd /etc/yum.repos.d
$ sudo vim mysql-community.repo

# mysql-community.repo 파일 내용
# 설치하려는 버전에 맞는 섹션의 gpgkey 값을 변경하면 된다.
# 기존 값은 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql80-community]
# gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql-2022

또는 설치 전에 다음의 명령어를 실행하여 키를 가져올 수 있다.

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

Leave a comment

이메일 주소는 공개되지 않습니다. 필수 항목은 *(으)로 표시합니다