問題
具體報錯資訊如下:
repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.
例如,在CentOS 6.8上安裝 percona
yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
yum list | grep percona
yum install percona-toolkit
最後一步報錯,報錯資訊如下所示:
warning: rpmts_HdrFromFdno: Header V4 RSA/SHA256 Signature, key ID 8507efa5: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
The GPG keys listed for the "Percona-Release YUM repository - x86_64" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.
解決方案
安裝現有的 gpg 公鑰,在 /etc/pki/rpm-gpg/ 下,可以執行如下指令直接把所有的都安裝上
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
yum -y install * --nogpgcheck
yum install percona-toolkit --nogpgcheck