更新CentOS源

1 yum -y install wget

首先备份/etc/yum.repos.d/CentOS-Base.repo

1 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

http://tel.mirrors.163.com/.help/centos.html          可以看此帮助页

http://tel.mirrors.163.com/.help/                其他linux帮助源的设置

 

1 wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

1 cp CentOS6-Base-163.repo /etc/yum.repos.d/

 

运行 yum makecache报错

http://mirrors.163.com/centos/6/updates/x86_64/repodata/447bc180e02faebd6dfec5f2257736261b6a3e2b04eb8786af52cdc9bef0b5f5-filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

1 先运行yum clean all
1 <strong>再运行yum makecache</strong>

解决,之后就可以用yum安装软件了


你可能感兴趣的:(更新CentOS源)