解決方法: 一句話:把/etc/yum.repos.d/epel.repo距淫,文件第3行注釋去掉,把第四行注釋掉。具體如下:
打開/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
修改為
[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
再清理源,重新安裝
yum clean all
yum install -y 需要的包
如果還是不行拴竹,修改DNS,到/etc/resolv.conf下添加一下:
nameserver 8.8.4.4
search localdomain
然后重啟network服務(wù):service network restart