无法在 Vagrant 上的 CentOS 7 运行 上安装 Docker
Can't install Docker on CentOS 7 running on Vagrant
B运行d 新实例使用 Vag运行t 文件
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
关于如何让它工作的想法?
您需要安装 device-mapper-event-libs
然后它才能工作。做就是了
sudo yum install device-mapper-event-libs
安装后 docker.
B运行d 新实例使用 Vag运行t 文件
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
关于如何让它工作的想法?
您需要安装 device-mapper-event-libs
然后它才能工作。做就是了
sudo yum install device-mapper-event-libs
安装后 docker.