CentOS6安装epel yum源

环境说明:
centos6.4
安装步骤如下:

  1. 执行yum install epel-release
  2. 执行yum clean all清除缓存
  3. 执行yum makecache重建缓存,注意此时可能会出现如下报错
[root@localhost ~]# yum makecache
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

这个报错是因为机器的CA证书过期了,需要更新下证书。更新的步骤如下:
4. 执行rpm -qa |grep ca-certificates查看CA证书,我的环境版本如下。

[root@localhost ~]# rpm -qa |grep ca-certificates
ca-certificates-2010.63-3.el6_1.5.noarch
  1. 执行yum --disablerepo=epel -y update ca-certificates更新CA证书。
  2. 执行yum makecache确认成功。
    说明:
    关于这个报错,有些人说的方法是将下面配置文件的baseurl注释取消,然后将mirrorlist注释。本人亲测发现没有管用。
[root@localhost ~]# vim /etc/yum.repos.d/epel.repo 

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值