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

Posted dadayan

tags:

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

这个配置告诉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

然后再次运行 yum 命令就可以成功了。当然,也有些包是需要先安装epel之后才能装上的。安装epel的方法是: yum install -y epel-release

转载自https://blog.csdn.net/nirendao/article/details/79313025


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

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'.

报错: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

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