在Vagrant上运行的CentOS 7上无法安装Docker [英] Can't install Docker on CentOS 7 running on Vagrant

查看:341
本文介绍了在Vagrant上运行的CentOS 7上无法安装Docker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Vagrant文​​件的全新实例

Brand new instance using Vagrant file

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "chef/centos-7.0"
  config.vm.network "forwarded_port", guest: 3000, host: 3007
end

然后运行以下命令

vagrant up
vagrant ssh
sudo su
yum install -y docker
systemctl status docker.service

这些都运行正常。

然后错误:

[root@localhost vagrant]# sudo systemctl start docker
Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
[root@localhost vagrant]# systemctl status docker.service -l
docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
   Active: failed (Result: exit-code) since Fri 2015-04-03 18:56:57 UTC; 26min ago
     Docs: http://docs.docker.com
  Process: 10359 ExecStart=/usr/bin/docker -d $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=127)
 Main PID: 10359 (code=exited, status=127)

Apr 03 18:56:57 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
Apr 03 18:56:57 localhost.localdomain docker[10359]: time="2015-04-03T18:56:57Z" level="info" msg="+job serveapi(unix:///var/run/docker.sock)"
Apr 03 18:56:57 localhost.localdomain docker[10359]: /usr/bin/docker: relocation error: /usr/bin/docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference
Apr 03 18:56:57 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=127/n/a
Apr 03 18:56:57 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
Apr 03 18:56:57 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
[root@localhost vagrant]# journalctl -xn
-- Logs begin at Fri 2015-04-03 18:41:26 UTC, end at Fri 2015-04-03 19:01:01 UTC. --
Apr 03 19:01:01 localhost.localdomain CROND[10368]: (root) CMD (run-parts /etc/cron.hourly)
Apr 03 19:01:01 localhost.localdomain run-parts(/etc/cron.hourly)[10371]: starting 0anacron
Apr 03 19:01:01 localhost.localdomain anacron[10377]: Anacron started on 2015-04-03
Apr 03 19:01:01 localhost.localdomain anacron[10377]: Will run job `cron.daily' in 35 min.
Apr 03 19:01:01 localhost.localdomain anacron[10377]: Will run job `cron.weekly' in 55 min.
Apr 03 19:01:01 localhost.localdomain anacron[10377]: Will run job `cron.monthly' in 75 min.
Apr 03 19:01:01 localhost.localdomain anacron[10377]: Jobs will be executed sequentially
Apr 03 19:01:01 localhost.localdomain run-parts(/etc/cron.hourly)[10379]: finished 0anacron
Apr 03 19:01:01 localhost.localdomain run-parts(/etc/cron.hourly)[10381]: starting 0yum-hourly.cron
Apr 03 19:01:01 localhost.localdomain run-parts(/etc/cron.hourly)[10385]: finished 0yum-hourly.cron


$ b $

Ideas as to how to get this working?

推荐答案

您需要安装 device- mapper-event-libs 然后它工作。安装Docker后,只需执行
sudo yum install device-mapper-event-libs

You need to install device-mapper-event-libs and then it works. Just do sudo yum install device-mapper-event-libs after you install docker.

这篇关于在Vagrant上运行的CentOS 7上无法安装Docker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆