yum -y update 报错:GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

  • The image of centos6.5 is used. The yum source is too old. I want to update it after modification:
yum -y update
  • Execution error:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
  • solution
  • vi /etc/yum.repos.d/CentOS-Base.repo
  • Change all RPM-GPG-KEY-CentOS-5 in the file to RPM-GPG-KEY-CentOS-6
:%s/RPM-GPG-KEY-CentOS-5/RPM-GPG-KEY-CentOS-6

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324812947&siteId=291194637