问题关键在于——老版本的CentOS官方已经停止服务了,镜像源的CentOS目录里已经没有任何镜像了。所有的镜像都迁移到新目录/centos-vault/里了。
各个大神已经给出了解决方案,我在此只给出一个可用的镜像网站:
清华大学的镜像网站:
https://mirrors4.tuna.tsinghua.edu.cn/centos-vault/
然后就是修改文件,我在这里给大家改好了,亲测可用
输入命令:
vi /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.6/os/x86_64/
gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.6/os/x86_64/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$ba