centos使用yum安装lighttpd的时候出现以下报错,不用说,yum源用的官方的,在我大天朝当然走不通了,更新成163的源试试
1 2 3 4 5 6 | yum install lighttpd Loaded plugins: fastestmirror Determining fastest mirrors Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 14: PYCURL ERROR 7 - "" Error: Cannot find a valid baseurl for repo: base |
更新centos yum源的步骤
[1] 首先备份/etc/yum.repos.d/CentOS-Base.repo
1 | mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup |
[2] 进入yum源配置文件所在文件夹
1 | cd /etc/yum.repos.d/ |
[3] 下载163的yum源配置文件,放入/etc/yum.repos.d/(操作前请做好相应备份)
1 | wget http://mirrors.163.com/.help/CentOS6-Base-163.repo |
[4] 运行yum makecache生成缓存
1 | yum makecache |
[5] 更新系统
1 | yum -y update |
原文链接:https://xiaohost.com/1744.html,转载请注明出处。
评论0