Cannot retrieve metalink for repository: epel…错误解决办法

centos下安装完EPEL源然后更新一下yum缓存如果发现这样的错误:

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

这种情况可能由多种原因导致:

  1. CA证书需要更新, 可以尝试如下解决方案
    yum --disablerepo=epel -y update ca-certificates
  2. 系统时间不正确,可以尝试使用sudo rdate -s 2.cn.pool.ntp.org同步服务器时间,若rdate没有安装在你的服务器,你可能需要手动调整你的服务器时间
  3. 不推荐修改repo文件,如果上面两个问题都正常,推荐使用代理

4 thoughts on “Cannot retrieve metalink for repository: epel…错误解决办法”

      1. 我的开始没解决,后来发现是系统时间不对,改对系统时间就OK了

Leave a Reply to 1 Cancel reply

Your email address will not be published. Required fields are marked *