报错: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 install的时候,偶尔会碰见这样的错误:Couldn’t open file /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

这是因为在你的 /etc/yum.repos.d 目录下有关于yum repository的配置文件中列有如下的GPG key:

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
1
这个配置告诉YUM,这个repository的GPG key存在于磁盘上。而当YUM在路径 /etc/pki/rpm-gpg 下找不到这个GPG key的时候,就会报如上的错误了。

解决方案:

cd /etc/pki/rpm-gpg
wget https://archive.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7

猜你喜欢

转载自www.cnblogs.com/ronglianbing/p/12158312.html
今日推荐