发布时间:2023-12-01 19:00
20.10.7
centos 7.9.2009
rpm包安装
Docker服务没有任何问题,但是当容器启动时报如下错误:
docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/moby/40b48d6f9ea6c0bbcbaa9413adb1914b41e4750465125742203b5d2cb72d3c06/log.json: no such file or directory): runc did not terminate successfully: unknown.
ERRO[0000] error waiting for container: context canceled
仔细看上边的报错,有一句runc did not terminate successfully: unknown.
,猜测是runc
导致的
运行runc
:
$ runc
runc: error while loading shared libraries: libseccomp.so.2: cannot open shared object
file: No such file or directory
通过上边执行runc
命令发现少libseccomp.so.2
动态库。应该是系统没安装libseccomp库。
安装libseccomp-2.3.1-4.el7.x86_64.rpm
(直接搜索可以找到下载地址)
$ rpm -ivh libseccomp-2.3.1-4.el7.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:libseccomp-2.3.1-4.el7 ################################# [100%]
再次启动容器成功!