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

Posted 傻子才悲伤

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7相关的知识,希望对你有一定的参考价值。

CentOS7安装任何软件,比如

yum -y install ansible

 

出现错误信息:

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

 

名词解释:

EPEL:extra packages for enterprise linux.

一般情况下用不到EPEL,直接disable这个功能。

vi /etc/yum.repos.d/epel.repo

修改前:

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

修改后:

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

 

重新yum -y install ansible,解决。

以上是关于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