http://mirror.centos.org/centos-6/
内容已移除,且目前第三方的镜像站中均已移除 CentOS 6的源。腾讯云的源 http://mirrors.tencent.com/
和http://mirrors.tencentyun.com/
也无法同步到 CentOS 6的源,当您在腾讯云上继续使用默认配置的 CentOS 6的源会发生报错。cat /etc/centos-release
CentOS-Base.repo
文件。vim /etc/yum.repos.d/CentOS-Base.repo
http://mirrors.tencentyun.com/centos-vault/6.x/
源。http://mirrors.tencent.com/centos-vault/6.x/
源。CentOS-Base.repo
文件如下图所示:
[extras]gpgcheck=1gpgkey=http://mirrors.tencentyun.com/centos/RPM-GPG-KEY-CentOS-6enabled=1baseurl=http://mirrors.tencentyun.com/centos-vault/6.9/extras/$basearch/name=Qcloud centos extras - $basearch[os]gpgcheck=1gpgkey=http://mirrors.tencentyun.com/centos/RPM-GPG-KEY-CentOS-6enabled=1baseurl=http://mirrors.tencentyun.com/centos-vault/6.9/os/$basearch/name=Qcloud centos os - $basearch[updates]gpgcheck=1gpgkey=http://mirrors.tencentyun.com/centos/RPM-GPG-KEY-CentOS-6enabled=1baseurl=http://mirrors.tencentyun.com/centos-vault/6.9/updates/$basearch/name=Qcloud centos updates - $basearch
CentOS-Epel.repo
文件。vim /etc/yum.repos.d/CentOS-Epel.repo
baseurl=http://mirrors.tencentyun.com/epel/$releasever/$basearch/
修改为 baseurl=http://mirrors.tencentyun.com/epel-archive/6/$basearch/
即可。修改完成后如下图所示:
[epel]name=epel for redhat/centos $releasever - $basearchfailovermethod=prioritygpgcheck=1gpgkey=http://mirrors.tencentyun.com/epel/RPM-GPG-KEY-EPEL-6enabled=1baseurl=http://mirrors.tencentyun.com/epel-archive/6/$basearch/
yum install
命令安装所需软件。
本页内容是否解决了您的问题?