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

Posted lianbingrong

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了报错: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

以上是关于报错:Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7的主要内容,如果未能解决你的问题,请参考以下文章

yum install 报错[Errno 14] curl#37 - Couldn't open file /mnt/repodata/repomd.xml

The file * couldn't be opened because you don't have permission to view it

iptables报错:Couldn't load target `accept':/lib64/iptables/libipt_accept.so: cannot open share

scrapy遇到Couldn't bind: 24: Too many open files.错误的解决

the file couldn't be opened because you don't have permission to view it

;;PANIC<< ROM: couldn't open ROM image file '/usr/share/bochs/BIOS-bochs-latest'.