解决centos8.3安装podman等时候的版本冲突

报错类似:

file /usr/lib/python3.6/site-packages/podman/client.py from install of python-podman-api-1.2.0-0.2.gitd0a45fe.module_el8.3.0+475+c50ce30b.noarch conflicts with file from package python3-podman-3.2.0-2.module_el8.5.0+890+6b136101.noarch

Error: Transaction test error: file /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release from install of containers-common-2:1-2.module_el8.5.0+890+6b136101.noarch conflicts with file from package redhat-release-8.3-1.0.el8.x86_64 

上面这些报错大概意思是2个版本冲突

那就卸载一个版本

rpm -e --nodeps pthon3-podman-3.2.0-2
 

直接说解决方法:

1、修改yum镜像仓库为

[root@localhost yum.repos.d]# pwd
/etc/yum.repos.d
[root@localhost yum.repos.d]# vi CentOS-Base.repo 

[base]
name=CentOS-8.3.2011 - Base - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/BaseOS/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.3.2011/BaseOS/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.3.2011/BaseOS/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
 
#additional packages that may be useful
[extras]
name=CentOS-8.3.2011 - Extras - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/extras/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.3.2011/extras/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.3.2011/extras/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-8.3.2011 - Plus - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/centosplus/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.3.2011/centosplus/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.3.2011/centosplus/$basearch/os/
gpgcheck=0
enabled=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
 
[PowerTools]
name=CentOS-8.3.2011 - PowerTools - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/PowerTools/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.3.2011/PowerTools/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.3.2011/PowerTools/$basearch/os/
gpgcheck=0
enabled=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official


[AppStream]
name=CentOS-8.3.2011 - AppStream - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/AppStream/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.3.2011/AppStream/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.3.2011/AppStream/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

dnf或者yum clean all

dnf或者yum makecache
 

再去执行安装podman成功。

注意如果你获取不到$releaserver,像我这样就是没有安装centos-server,所以不能获取$releasever这个变量

[root@localhost yum.repos.d]# rpm -qi centos-server
package centos-server is not installed

那就修改网上的源$releaserver改成你系统的实际版本,8.3.2011。还有修改全部enable=1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值