赞
踩
安装宝塔时出现“Cannot retrieve metalink for repository: epel. Please verify its path and try again”
输入命令:vi /etc/yum.repos.d/epel.repo
打开/etc/yum.repos.d/epel.repo,
将文件第3行前面的#去掉,即取消注释;
把第四行最前面加上#,即注释掉。
具体如下:
即:
1. [epel]
2. name=Extra Packages for Enterprise Linux 6 - $basearch
3. #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
4. mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
修改为:
1. [epel]
2. name=Extra Packages for Enterprise Linux 6 - $basearch
3. baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
4. #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
再清理源,重新安装:
1. yum clean all
2. yum install -y需要的包
如果还是不行,可以试下修改DNS。
在/etc/resolv.conf中添加一下。
输入命令:
nameserver 8.8.8.8
search localdomain
然后重启network服务:
service network restart
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。