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,解決。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM