首页 > 代码库 > yum安装时出现:Cannot retrieve metalink for repository: epel. Please verify its path and try again
yum安装时出现:Cannot retrieve metalink for repository: epel. Please verify its path and try again
在CentOS 6.3 x86_64下安装php-mcrypt的时候出现了问题: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 需要的包
如果还是不行,修改DNS,到/etc/resolv.conf下添加一下:
nameserver 8.8.8.8
search localdomain
然后重启network服务:service network restart
yum安装时出现:Cannot retrieve metalink for repository: epel. Please verify its path and try again
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。