Centos:Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

报以上错误说明yum配置文件有GPG key:

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

找不到/etc/pki/rpm-gpg下的GPG key时就会报错

解决方法 :
1.安装epelyum install -y epel-release
2.安装wgetyum install -y wget

一般来说以上2个步骤都不需要操作
3.进入并安装:
cd /etc/pki/rpm-gpg
wget https://archive.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7

接着yum就可以了

你可能感兴趣的:(linux)