yum安裝時(shí)出現(xiàn):Cannot retrieve metalink for repository: epel. Please verify its path and try again
2018年09月02日 20:29:12?冷血java?閱讀數(shù) 972更多
分類專欄:?linux
在CentOS 6.3 x86_64下安裝php-mcrypt的時(shí)候出現(xiàn)了問題:Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again啄栓,需要安裝epel源。
解決方法: 一句話:把/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 需要的包