关于 yum 的 Error: Cannot retrieve metalink for repository: epel

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了关于 yum 的 Error: Cannot retrieve metalink for repository: epel相关的知识,希望对你有一定的参考价值。

  CentOS 6.4 安装 epel 源后报这个错误,百度一下都是说 

  “

编辑/etc/yum.repos.d/epel.repo,把基础的恢复,镜像的地址注释掉

#baseurl
mirrorlist

改成

baseurl
#mirrorlist

 ”

这个可以称为 “扬汤止沸”。真正的解决还得借签歪果仁的方法,

"


You just needed to update ca-certificates package. Before that just disable all repos with https that are failing. That‘s why sollution with commenting mirrorlist or using http instead https would work also.

For example if you need to disable only epel repo:

yum --disablerepo=epel -y update  ca-certificates

This will also help wget, curl, and anything else that uses SSL certificates.

"

这是因为 ca-certificates 这个包太旧的原因,更新一下就好了。在新一些的 比如 centos-6.7 上是没有这个问题的。

本文出自 “海风久远” 博客,请务必保留此出处http://beyondhf.blog.51cto.com/8953234/1855861

以上是关于关于 yum 的 Error: Cannot retrieve metalink for repository: epel的主要内容,如果未能解决你的问题,请参考以下文章

运行yum报错Error: Cannot retrieve metalink for reposit

yum 报错 Error: Cannot find a valid baseurl for repo: base

yum error: cannot open Packages database in /var/lib/rpm

yum Error: Cannot retrieve repository metadata (repomd.xml) for repository:xxxxxx.

Error: Failed to download metadata for repo ‘epel‘: Cannot download repomd.xml: Cannot download repo

Error: Failed to download metadata for repo ‘epel‘: Cannot download repomd.xml: Cannot download repo