解决错误"Cannot retrieve metalink for repository: epel/x86_64"

直接使用yum安装的epel-release, 在安装scsi-target-utils时报错

 One of the configured repositories failed (Unknown),
...

...

Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
 

 

处理方法

编辑epel.repo, 去除epel段中baseurl行的注释符, 并注释metalink行

vim /etc/yum.repos.d/epel.repo


[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
#metalink=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
 

[参考资料]

yum安装时出现:Cannot retrieve metalink for repository: epel. Please verify its path and try again

原文:https://blog.csdn.net/sean908/article/details/89335289 
 

你可能感兴趣的:(yum)