centos yum安装时出现:Cannot retrieve metalink for repository: epel. Please verify its path and try again
生活随笔
收集整理的這篇文章主要介紹了
centos yum安装时出现:Cannot retrieve metalink for repository: epel. Please verify its path and try again
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
在CentOS 7.1 x86_64下安裝寶塔面板的時候出現(xiàn)了問題:Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again,需要安裝epel源。
解決方法: 一句話:把/etc/yum.repos.d/epel.repo,文件第3行注釋去掉,把第四行注釋掉。
具體如下:
打開/etc/yum.repos.d/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
修改為
[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
再清理源,重新安裝
yum clean all
yum install -y 需要的包
如果還是不行,修改DNS,到/etc/resolv.conf下添加一下:
nameserver 8.8.8.8
search localdomain
然后重啟network服務:service network restart
總結
以上是生活随笔為你收集整理的centos yum安装时出现:Cannot retrieve metalink for repository: epel. Please verify its path and try again的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: destoon让管理员的公司按积分排序不
- 下一篇: Winows Server 2019 激