笔者环境:阿里云Cent OS 6.8 64位操作系统
Segmentation Fault or Critical Error encountered. Dumping core and aborting.
Aborted
原因是因为我在安装时使用的 yum install docker
,安装的docker
,但实际上需要安装docker-io
首先卸载原有docker
# 查看内核版本
uname -r
# 查找原有docker
yum list installed |grep docker
# 删除上述所有查出来的docker
yum -y remove docker.x86_64
# 安装docker-io
yum install docker-io
但仍然报以下错误
Error: Package: lxc-libs-1.0.11-1.el6.x86_64 (epel)
Requires: rsync
Error: Package: docker-io-1.7.1-2.el6.x86_64 (epel)
Requires: libcgroup
You could try using --skip-broken to work around the problem
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
authconfig-6.1.12-23.el6.x86_64 has missing requires of newt-python
python-2.6.6-52.el6.x86_64 has missing requires of python-libs(x86-64) = ('0', '2.6.6', '52.el6')
主要是缺少rsync与libcgrorup包,我们手动安装一下
# 下载rsync
wget https://mirrors.aliyun.com/centos/6.10/os/x86_64/Packages/rsync-3.0.6-12.el6.x86_64.rpm
# 下载libgroup
wget https://mirrors.aliyun.com/centos/6.10/os/x86_64/Packages/libcgroup-0.40.rc1-26.el6.x86_64.rpm
# 安装两个包
rpm -ivh rsync-3.0.6-12.el6.x86_64.rpm
rpm -ivh libcgroup-0.40.rc1-26.el6.x86_64.rpm
最后重新执行安装docker-io 的命令,安装完成后输出结果如下
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
authconfig-6.1.12-23.el6.x86_64 has missing requires of newt-python
python-2.6.6-52.el6.x86_64 has missing requires of python-libs(x86-64) = ('0', '2.6.6', '52.el6')
Installing : lxc-libs-1.0.11-1.el6.x86_64 1/6
Installing : lua-filesystem-1.4.2-1.el6.x86_64 2/6
Installing : lua-lxc-1.0.11-1.el6.x86_64 3/6
Installing : lua-alt-getopt-0.7.0-1.el6.noarch 4/6
Installing : lxc-1.0.11-1.el6.x86_64 5/6
Installing : docker-io-1.7.1-2.el6.x86_64 6/6
Verifying : lxc-1.0.11-1.el6.x86_64 1/6
Verifying : lua-lxc-1.0.11-1.el6.x86_64 2/6
Verifying : lxc-libs-1.0.11-1.el6.x86_64 3/6
Verifying : docker-io-1.7.1-2.el6.x86_64 4/6
Verifying : lua-alt-getopt-0.7.0-1.el6.noarch 5/6
Verifying : lua-filesystem-1.4.2-1.el6.x86_64 6/6
Installed:
docker-io.x86_64 0:1.7.1-2.el6
Dependency Installed:
lua-alt-getopt.noarch 0:0.7.0-1.el6 lua-filesystem.x86_64 0:1.4.2-1.el6
lua-lxc.x86_64 0:1.0.11-1.el6 lxc.x86_64 0:1.0.11-1.el6
lxc-libs.x86_64 0:1.0.11-1.el6
docker常用命令
# 查看docker版本
docker -v
# 启动docker服务
service docker start
# docker开机启动
chkconfig docker on
# 查看镜像
docker ls