yum报错: Cannot retrieve metalink for repository: epel. Please verify its path and try again

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

解决:

[root@dg1 yum.repos.d]# cat 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
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
#baseurl= http://download.fedoraproject.org/pub/epel/6/$basearch/debug
mirrorlist= https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
#baseurl= http://download.fedoraproject.org/pub/epel/6/SRPMS
mirrorlist= https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
注释baseurl,开启mirrorlist

表明你需要更新CA证书了,那么只需要更新CA证书就可以,不过在此同时需要临时禁用epel源并更新就可以了,命令如下:
[root@dg1 yum.repos.d]# yum --disablerepo=epel -y update ca-certificates

你可能感兴趣的:(yum报错: Cannot retrieve metalink for repository: epel. Please verify its path and try again)