CentOS 7 于2024年6月30日停止维护,官方仓库已经没有软件了,想要继续使用 ,需要更换软件仓库,这里更换到阿里云的软件仓库 https://developer.aliyun.com/mirror/
查看目前可用的软件数量
bash
yum repolist

更换软件仓库:
1、更换到 root 用户
bash
su - root

2、 删除默认的官方软件仓库
bash
rm -rf /etc/yum.repos.d/*

3、查看目前仓库情况
bash
yum repolist

4、打开阿里云的镜像网站: https://developer.aliyun.com/mirror/ ,复制命令到终端上执行


bash
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
bash
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

5、查看软件仓库最新情况
bash
yum repolist
