赞
踩
新安装的一台云服务器, 执行yum命令出现了错误, One of the configured repositories failed (Unknown), 最后是Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again 。完整的错误信息是:
这里重点是最后一行 for repository: epel/x86_64. 说明是这个仓储出了问题。
解决办法1 删除这个仓库
rm -f mv /etc/yum.repos.d/epel.repo
这样执行yum命令就可以正确的执行。不过少了 epel 仓库好多软件包不能用。
这里介绍
第二种解决方法
查看了
cat /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-debuginfo] name=Extra Packages for Enterprise Linux 7 - $basearch - Debug #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 gpgcheck=1 [epel-source] name=Extra Packages for Enterprise Linux 7 - $basearch - Source #baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 gpgcheck=1
然后测试了一下网络
[root@lampfree.com ~]# ping download.fedoraproject.org
ping: download.fedoraproject.org: Name or service not known
[root@lampfree.com ~]# ping mirrors.fedoraproject.org
ping: mirrors.fedoraproject.org: Name or service not known
发现网络不通,这里就需要解决网络问题。
修改dns
cat /etc/resolv.conf
nameserver 8.8.8.8
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。