php79 / stack

PHP 5.3 ~ 8.4 + Nginx + Let's Encrypt + MariaDB + 앱 자동 설치
https://www.php79.com
MIT License
90 stars 32 forks source link

CentOS 7 - MariaDB 설치시 GPG 키 오류 #96

Closed ibin79 closed 1 year ago

ibin79 commented 1 year ago

MariaDB 설치시 GPG 키 오류

[root@mail scripts]# yum install MariaDB-server MariaDB-client MariaDB-common MariaDB-compat MariaDB-shared

===================================================================================================================================================================================
 Package                                      Arch                                 Version                                             Repository                             Size
===================================================================================================================================================================================
Installing:
 MariaDB-client                               x86_64                               10.6.12-1.el7.centos                                mariadb                                14 M
 MariaDB-common                               x86_64                               10.6.12-1.el7.centos                                mariadb                                82 k
 MariaDB-compat                               x86_64                               10.6.12-1.el7.centos                                mariadb                               2.2 M
 MariaDB-server                               x86_64                               10.6.12-1.el7.centos                                mariadb                                25 M
 MariaDB-shared                               x86_64                               10.6.12-1.el7.centos                                mariadb                               117 k
Installing for dependencies:
 galera-4                                     x86_64                               26.4.14-1.el7.centos                                mariadb                               9.9 M
 libpmem                                      x86_64                               1.5.1-2.1.el7                                       base                                   59 k
 socat                                        x86_64                               1.7.3.2-2.el7                                       base                                  290 k

Transaction Summary
===================================================================================================================================================================================
Install  5 Packages (+3 Dependent packages)

Total size: 52 M
Installed size: 255 M
Is this ok [y/d/N]: y
Downloading packages:
경고: /var/cache/yum/x86_64/7/mariadb/packages/MariaDB-common-10.6.12-1.el7.centos.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID c74cd1d8: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-MariaDB

The GPG keys listed for the "MariaDB" 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: MariaDB-common-10.6.12-1.el7.centos.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-MariaDB
ibin79 commented 1 year ago

임시 조치

image

cd /etc/pki/rpm-gpg/ && curl -O http://mirror.mariadb.org/yum/RPM-GPG-KEY-MariaDB
ibin79 commented 1 year ago

변경 시기

02.06 stack v1.3.0 빌드 테스트시엔 문제가 없었으나, 그 이후로 바뀐 것으로 추정.

개선

공식 가이드 방법으로 대체

https://mariadb.com/kb/en/gpg/

Beginning in 2023 we migrated the key used to sign our yum/dnf/zypper repositories and to sign our source code and binary tarballs to the same key we use for Debian and Ubuntu.

rpmkeys --import https://supplychain.mariadb.com/MariaDB-Server-GPG-KEY
rpm -qi gpg-pubkey-c74cd1d8-56fc10ab

Name        : gpg-pubkey
Version     : c74cd1d8
Release     : 56fc10ab
Architecture: (none)
Install Date: Sat 11 Feb 2023 11:32:03 AM KST
Group       : Public Keys
Size        : 0
License     : pubkey
Signature   : (none)
Source RPM  : (none)
Build Date  : Thu 31 Mar 2016 02:45:15 AM KST
Build Host  : localhost
Relocations : (not relocatable)
Packager    : MariaDB Signing Key <signing-key@mariadb.org>
Summary     : gpg(MariaDB Signing Key <signing-key@mariadb.org>)
            msg info 'Adding trusted package signing keys...'
            if rpm --import "${key_urls[@]}"
            then
                pushd /etc/pki/rpm-gpg/
                  for key in ${key_urls[@]} ; do curl -LsSO ${key};done
                popd
                msg info 'Successfully added trusted package signing keys'
            else
                msg error 'Failed to add trusted package signing keys'
            fi
ibin79 commented 1 year ago

기존 사용자 yum 업데이트 에러시, KEY 갱신 방법

경고: /var/cache/yum/x86_64/7/mariadb/packages/MariaDB-server-10.6.12-1.el7.centos.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID c74cd1d8: NOKEY1 MB/s |  24 MB  00:00:00 ETA 
Public key for MariaDB-server-10.6.12-1.el7.centos.x86_64.rpm is not installed
MariaDB-server-10.6.12-1.el7.centos.x86_64.rpm                                                                                                              |  25 MB  00:00:06     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-MariaDB

The GPG keys listed for the "MariaDB" 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: MariaDB-server-10.6.12-1.el7.centos.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-MariaDB
rpmkeys --import https://supplychain.mariadb.com/MariaDB-Server-GPG-KEY
curl -LsS -o /etc/pki/rpm-gpg/RPM-GPG-KEY-MariaDB https://supplychain.mariadb.com/MariaDB-Server-GPG-KEY
ibin79 commented 1 year ago

추가 특이사항 없으므로 종결