[[email protected] ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[[email protected] ~]]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
[[email protected] yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
[[email protected] yum.repos.d]# wget http://mirrors.163.com/.help/CentOS5-Base-163.repo
[[email protected] yum.repos.d]# yum makecache
[[email protected] yum.repos.d]# yum -y update
[[email protected] ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[[email protected] ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[[email protected] ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
[[email protected] ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
[[email protected] ~]# yum makecache
[[email protected] ~]# yum -y update
将上面的镜像源覆盖到sources.list里,保存。
将上面的一个镜像源 覆盖 到sources.list里,保存。
4.2 sudo rm -f /var/lib/apt/lists/lock 删除lock文件
4.3 再用 sudo apt-get update 更新源
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)