【问题标题】:Can't install Docker on CentOS 7 running on Vagrant无法在 Vagrant 上运行的 CentOS 7 上安装 Docker
【发布时间】:2015-06-08 22:11:53
【问题描述】:

使用 Vagrant 文件的全新实例

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

关于如何使其发挥作用的想法?

【问题讨论】:

    标签: docker vagrant centos7


    【解决方案1】:

    您需要安装device-mapper-event-libs 然后它才能工作。做就是了 sudo yum install device-mapper-event-libs 安装 docker 后。

    【讨论】:

    • 谢谢,在其他地方没有看到这个建议
    猜你喜欢
    • 2020-06-20
    • 1970-01-01
    • 1970-01-01
    • 2023-03-22
    • 2020-06-08
    • 1970-01-01
    • 2015-06-29
    • 2018-11-25
    • 1970-01-01
    相关资源
    最近更新 更多