关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

CentOS 5.x系列 官方停止更新支持后yum源失效解决方案

发布时间:2021-04-22 22:02:55

近期CentOS 5.x系列官方已经停止更新支持,同时官方也把yum源删除了,目前CentOS 5.x系统使用yum命令安装软件包基本都是失败,报错404 NotFound,因此需要更换yum源。

执行以下代码后即可恢复正常使用

cat  >  /etc/yum.repos.d/CentOS-Base.repo  <<EOF
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.aliyun.com/centos-vault/5.11/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5#released updates [updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.aliyun.com/centos-vault/5.11/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5#packages used/produced in the build but not released[addons]
name=CentOS-$releasever - Addons
baseurl=http://mirrors.aliyun.com/centos-vault/5.11/addons/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5#additional packages that may be useful[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.aliyun.com/centos-vault/5.11/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5#additional packages that extend functionality of existing packages[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.aliyun.com/centos-vault/5.11/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5#contrib - packages by Centos Users[contrib]
name=CentOS-$releasever - Contrib
baseurl=http://mirrors.aliyun.com/centos-vault/5.11/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
EOF



/template/Home/ZdsjuAY/PC/Static