我试图在rpi4上安装停靠程序,但运行时出现了此错误
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
我有过
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2021-02-15 19:44:36 GMT; 14ms ago
Docs: https://docs.docker.com
Process: 9174 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 9174 (code=exited, status=1/FAILURE)
dpkg: error processing package docker-ce:armhf (--configure):
installed docker-ce:armhf package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of docker-ce-rootless-extras:armhf:
docker-ce-rootless-extras:armhf depends on docker-ce; however:
Package docker-ce:armhf is not configured yet.
dpkg: error processing package docker-ce-rootless-extras:armhf (--configure):
dependency problems - leaving unconfigured
Processing triggers for systemd (241-7~deb10u6) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
Errors were encountered while processing:
docker-ce:armhf
docker-ce-rootless-extras:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)我的日志
$ journalctl -fu docker
-- Logs begin at Thu 2019-02-14 10:11:58 GMT. --
Feb 15 19:44:43 raspberrypi4 dockerd[9311]: failed to start daemon: error initializing graphdriver: driver not supported
Feb 15 19:44:43 raspberrypi4 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Feb 15 19:44:43 raspberrypi4 systemd[1]: docker.service: Failed with result 'exit-code'.
Feb 15 19:44:43 raspberrypi4 systemd[1]: Failed to start Docker Application Container Engine.
Feb 15 19:44:45 raspberrypi4 systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart.
Feb 15 19:44:45 raspberrypi4 systemd[1]: docker.service: Scheduled restart job, restart counter is at 4.
Feb 15 19:44:45 raspberrypi4 systemd[1]: Stopped Docker Application Container Engine.
Feb 15 19:44:45 raspberrypi4 systemd[1]: docker.service: Start request repeated too quickly.
Feb 15 19:44:45 raspberrypi4 systemd[1]: docker.service: Failed with result 'exit-code'.
Feb 15 19:44:45 raspberrypi4 systemd[1]: Failed to start Docker Application Container Engine.怎么了?
发布于 2021-02-28 22:09:28
在安装了内核头之后,我就遇到了同样的问题。如果您这样做,请记住重新启动RasPi,然后检查服务状态。
sudo systemctl status docker.service我还更喜欢在/etc/docker/daemon.json中指定主机,更多细节请参见这里。
因此,我不得不在-H单元配置(/lib/systemd/system/docker.service)中删除systemd选项。
不确定到底是什么起了作用,但是在重新启动之后一切都启动并运行了。不确定它是否永久修复,因为这个文件可以由您的下一个apt upgrade或apt install docker-ce修改。
https://unix.stackexchange.com/questions/634640
复制相似问题