vagrantでcentos6.7の開発環境の作成をおこなっていたところ
「yum update」でエラーが発生した
warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID ef8d349f: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs-PC1 The GPG keys listed for the "Puppet Labs PC1 Repository el 6 - 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.
やったけどうまくいかなかった事1
証明書が古くて、更新権限がないのかなと思って権限をかえてみた
# cd /etc/pki/rpm-gpg/ # ls -ltr total 24 -rw-r--r-- 1 root root 1649 Nov 5 2012 RPM-GPG-KEY-EPEL-6 -rw-r--r--. 1 root root 1734 Aug 3 2015 RPM-GPG-KEY-CentOS-Testing-6 -rw-r--r--. 1 root root 1730 Aug 3 2015 RPM-GPG-KEY-CentOS-Security-6 -rw-r--r--. 1 root root 1730 Aug 3 2015 RPM-GPG-KEY-CentOS-Debug-6 -rw-r--r--. 1 root root 1706 Aug 3 2015 RPM-GPG-KEY-CentOS-6 -rw-r--r-- 1 root root 1716 Oct 1 2015 RPM-GPG-KEY-puppetlabs-PC1 chmod 777 RPM-GPG-KEY-puppetlabs-PC1
もちろんNGでした
やったけどうまくいかなかった事2
「ファイルがあると存在エラーが発生しているのかな」と思い、ファイルをリネームしてみた
mv RPM-GPG-KEY-puppetlabs-PC1 RPM-GPG-KEY-puppetlabs-PC1.backup
もちろんNGでした
成功した対策
原因がさっぱりだったので
「Puppet Labs PC1 Repository el 6 」でググりました
これっぽいのがヒットしたので
https://docs.puppet.com/puppet/latest/reference/puppet_collections.html
rpm -Uvh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm Retrieving https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm Preparing... ########################################### [100%] 1:puppetlabs-release-pc1 ########################################### [100%] yum update ・ ・ 省略 ・ ・ warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID ef8d349f: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs-PC1 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-PC1 Importing GPG key 0xEF8D349F: Userid : Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release@puppet.com> Package: puppetlabs-release-pc1-1.1.0-2.el7.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-PC1 Is this ok [y/N]: y ・ ・ 省略 ・ ・ yum-plugin-fastestmirror.noarch 0:1.1.30-37.el6 Complete!
本当にあっているのか、わからないが
「yum update」が通った!!
よしとする