客户现场买了服务器,常规的按照阿里云镜像站替换成国内镜像源,结果发现安装软件或者升级时报错:

 package cockpit-bridge-251.1-1.el8.x86_64 conflicts with cockpit-storaged < 233 provided by cockpit

百度了半天发现替换成centos-vault 源之前必须保证你系统为8.5版本,安装下面步骤先升级系统到8.5后才能替换阿里源。

# 先替换到阿里云8镜像源,官方那个没法安装了
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
yum clean all && yum makecache
# 安装CentOS8.5
yum install centos-linux-release-8.5
yum update -y
reboot

通过cat /etc/centos-release 可以查看当前CentOS版本是否已经升级到8.5,升级成功后安装阿里镜像站命令替换源。

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum clean all && yum makecache