Thursday, December 4, 2014

Yum giving "Cannot retrieve metalink for repository: epel" Error for CentOS 6

When I was updating yum install or doing yum update on CentOS 6.4, I received an error "Cannot retrieve metalink for repository: epel"

The error is because of the scripts in the epel.repo under the mirrorlist pointing to https instead of http. If you amend it to http, the epel repo will work

 At /etc/yum/repos.d/epel.repo, change to

[epel]
.....
.....
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

[epel-debuginfo]
.....
.....
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch

References:
  1. CentOS 6.3 Instance Giving "Cannot retrieve metalink for repository: epel" Error

No comments: