yum install epel-release 之後,使用 yum 命令都提示錯誤:
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
1. 嘗試網絡上的辦法,在 /etc/yum.repos.d 目錄下找到 epel.repo 將開頭爲 baseurl 去除註釋,並註釋掉 mirrorlist
#baseurl
mirrorlist
baseurl
#mirrorlist
參考地址:http://blog.sina.com.cn/s/blog_8097f8aa0102vnlk.html
2. 也有的人說是需要更新CA證書了:yum --disablerepo=epel -y update ca-certificates
參考地址:https://www.slll.info/archives/1842.html
以上是大部分網友提供的解決方法,但這個併爲解決我的問題!!!
很奇怪,總感覺網上的答案總是解決不了我的問題,於是我把 /etc/yum.repos.d 目錄下 epel.repo 重命名爲非 repo 後綴的文件,
這個時候 yum 命令就正常使用了,可是我需要用到 epel-release 啊,不然安裝不了 python-pip ,這個問題又回到了我上一篇文章了,也就是因爲 yum 沒有更新的原因了
附上解決地址:https://blog.csdn.net/qq_25868251/article/details/89176673