一、问题描述
安装docker的时候报错
运行:
yum -y install docker
报错:
...
---> Package python-syspurpose.x86_64 0:1.24.48-1.el7.centos will be installed
---> Package subscription-manager-rhsm.x86_64 0:1.24.48-1.el7.centos will be installed
--> Running transaction check
---> Package python-backports.x86_64 0:1.0-8.el7 will be installed
---> Package python-ipaddress.noarch 0:1.0.16-2.el7 will be installed
--> Processing Conflict: 3:docker-ce-20.10.8-3.el7.x86_64 conflicts docker
--> Processing Conflict: 3:docker-ce-20.10.8-3.el7.x86_64 conflicts docker-io
--> Processing Conflict: 1:docker-ce-cli-20.10.8-3.el7.x86_64 conflicts docker
--> Processing Conflict: 1:docker-ce-cli-20.10.8-3.el7.x86_64 conflicts docker-io
--> Finished Dependency Resolution
Error: docker-ce conflicts with 2:docker-1.13.1-208.git7d71120.el7_9.x86_64
Error: docker-ce-cli conflicts with 2:docker-1.13.1-208.git7d71120.el7_9.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
二、问题原因
新安装的docker和系统中已经安装的docker-ce和docker-ce-cli版本有冲突,删除冲突包即可。
三、解决办法
解决问题办法:
sudo yum -y remove docker-ce
sudo yum -y remove docker-ce-cli