我之前跟着https://docs.docker.com/installation/rhel/在rhel6.5上安装了docker。这曾经工作到今天,直到我决定运行“yum update”并升级到docker1.3。
现在,/ etc / init.d / docker启动失败。
-bash-4.1$ sudo /etc/init.d/docker status
docker dead but pid file exists
/ var / log / docker的内容:
-bash-4.1$ more /var/log/docker
\nSun Nov 30 23:29:14 IST 2014\n
2014/11/30 23:29:14 docker daemon: 1.3.1 c78088f/1.3.1; execdriver: native; grap
hdriver:
[dd907331] +job serveapi(unix:///var/run/docker.sock)
[info] WARNING: You are running linux kernel version 2.6.32-431.el6.x86_64, whic
h might be unstable running docker. Please upgrade your kernel to 3.8.0.
/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 lin
k time reference
我还没有选择升级到rhel7,并且已经尝试过
答案 0 :(得分:45)
/ usr / bin / docker:重定位错误:/ usr / bin / docker:symbol dm_task_get_info_with_deferred_remove,版本Base未在文件libdevmapper.so.1.02中定义,带有链接时间参考
本周我在工作中遇到过这个问题(同样在RHEL6.5上)。我相信你所拥有的lib-device-mapper并没有导出Docker所需的符号(" Base")。我通过将lib-device-mapper升级到版本1.02.90来解决这个问题。
您可能必须启用public_ol6_latest
repo才能获得此软件包。
sudo yum-config-manager --enable public_ol6_latest
然后安装软件包:
sudo yum install device-mapper-event-libs
答案 1 :(得分:17)
TL; DR:在我的情况下,我需要在CentOS / RHEL 6.5上升级包device-mapper-libs
。详情如下。
$ yum update -y device-mapper-libs
在RHEL / CentOS 6.5上,我在尝试运行docker守护程序时遇到了同样的错误:
$ docker -d
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] WARNING: You are running linux kernel version 2.6.32-431.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.8.0.
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
docker: relocation error: docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference
在排查问题时,我遇到了Debian的讨论docker.io: docker does't run after upgrade。
这里的参考是“修复”之前的环境:
$ uname -a
Linux build1 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/redhat-release
CentOS release 6.5 (Final)
升级前device-mapper-libs
版本为1.02.79
。在上面链接的Debian错误报告中,有人指出Docker 1.4.1(与原版海报询问的版本不同)是针对较新版本的device-mapper-libs
(libdevmapper 2:1.02.90-1
编译的,请注意,Debian中的包名称不同。)
$ yum info device-mapper-libs
Installed Packages
Name : device-mapper-libs
Arch : x86_64
Version : 1.02.79
Release : 8.el6
<...snip...>
更新device-mapper-libs
解决了问题:
$ yum update -y device-mapper-libs
# Yep, the package was updated to the latest version (1.02.90)
$ rpm -qi device-mapper-libs
Name : device-mapper-libs Relocations: (not relocatable)
Version : 1.02.90 Vendor: CentOS
Release : 2.el6_6.1 Build Date: Wed 26 Nov 2014
<...snip...>
更新完成后,docker守护程序将成功启动:
$ # docker -d
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] WARNING: You are running linux kernel version 2.6.32-431.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.8.0.
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
INFO[0000] +job init_networkdriver()
INFO[0000] -job init_networkdriver() = OK (0)
INFO[0000] Loading containers: start.
INFO[0000] Loading containers: done.
INFO[0000] docker daemon: 1.4.1 5bc2ff8/1.4.1; execdriver: native-0.2; graphdriver: devicemapper
INFO[0000] +job acceptconnections()
INFO[0000] -job acceptconnections() = OK (0)
希望这有帮助!
答案 2 :(得分:4)
在Vagrant / VBox上的CentOS 7上安装Docker 1.5时遇到了同样的问题。升级DevMapper解决了这个问题。为此,请运行命令:
$ sudo yum update device-mapper
答案 3 :(得分:0)
我在centOS7中安装docker 1.6后遇到了这个问题,无法成功运行docker。之后
yum install lvm2
它在centOS7中对我有用:)
希望这对于在centOS7中遇到同样问题的人有用。