在 Centos 7.4 上安装 docker 失败。
我运行命令来安装一些依赖项:
# yum install device-mapper-persistent-data lvm2
我得到了结果:
Error: Package: 7:device-mapper-event-1.02.140-8.el7.x86_64 (ultra-centos-7.4-base) Requires: device-mapper = 7:1.02.140-8.el7 Installed: 7:device-mapper-1.02.146-4.el7.x86_64(installed) device-mapper = 7:1.02.146-4.el7 Available: 7:device-mapper-1.02.140-8.el7.x86_64 (ultra-centos-7.4-base) device-mapper = 7:1.02.140-8.el7
操作系统信息:
uname -a => Linux 邮件 3.10.0-862.3.2.el7.x86_64 #1 x86_64 x86_64 x86_64 GNU/Linux
Redhat 版本:
cat /etc/redhat-release => Centos Linux 7.4.1708(核心)
答案1
错误信息解释:
软件包:7:device-mapper-event-1.02.140-8.el7.x86_64 (ultra-centos-7.4-base) 要求:device-mapper = 7:1.02.140-8.el7
已安装:7:device-mapper-1.02.146-4.el7.x86_64(已安装)device-mapper = 7:1.02.146-4.el7
可用:7:device-mapper-1.02.140-8.el7.x86_64(ultra-centos-7.4-base)device-mapper = 7:1.02.140-8.el7
看起来您尝试安装的软件包(device-mapper-persistent-data)需要软件包 device-mapper = 7:1.02.140-8.el7。
您已安装 device-mapper,但安装的版本是 device-mapper-1.02.146-4.el7.x86_64
该错误还告诉您可以安装可用版本。在 CentOS 中,您可以使用 yum 命令来安装、升级和删除软件包。查看 yum 命令示例,搜索 centos device mapper 以开始使用。