码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2016-09-14 19:04:51      阅读:1953      评论:0      收藏:0      [点我收藏+]

标签:

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

标签:

原文地址:http://www.cnblogs.com/flasheryu/p/5873081.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!