sudo systemctl start docker docker.service 的作业失败,因为控制进程退出并显示错误代码

sudo systemctl start docker docker.service 的作业失败,因为控制进程退出并显示错误代码

我正在尝试运行某人的脚本:

mona@goku:~/research/code/PyTorch-Encoding$ bash scripts/build_docker.sh

mona@goku:~/research/code/PyTorch-Encoding$ cat scripts/build_docker.sh
docker build --network=host -t encoding .

mona@goku:~/research/code/PyTorch-Encoding$ sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.

mona@goku:~/research/code/PyTorch-Encoding$ systemctl status docker.service
● docker.service - LSB: Create lightweight, portable, self-sufficient containers.
     Loaded: loaded (/etc/init.d/docker; generated)
     Active: failed (Result: exit-code) since Sat 2021-01-30 00:18:41 EST; 17s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 197999 ExecStart=/etc/init.d/docker start (code=exited, status=1/FAILURE)

Jan 30 00:18:41 goku systemd[1]: Starting LSB: Create lightweight, portable, self-sufficient containers....
Jan 30 00:18:41 goku docker[197999]:  * /usr/bin/dockerd not present or not executable
Jan 30 00:18:41 goku systemd[1]: docker.service: Control process exited, code=exited, status=1/FAILURE
Jan 30 00:18:41 goku systemd[1]: docker.service: Failed with result 'exit-code'.
Jan 30 00:18:41 goku systemd[1]: Failed to start LSB: Create lightweight, portable, self-sufficient containers..

mona@goku:~/research/code/PyTorch-Encoding$ journalctl -xe
Jan 30 00:18:41 goku systemd[1]: Starting LSB: Create lightweight, portable, self-sufficient containers....
-- Subject: A start job for unit docker.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit docker.service has begun execution.
-- 
-- The job identifier is 12145.
Jan 30 00:18:41 goku docker[197999]:  * /usr/bin/dockerd not present or not executable
Jan 30 00:18:41 goku systemd[1]: docker.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An ExecStart= process belonging to unit docker.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Jan 30 00:18:41 goku systemd[1]: docker.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit docker.service has entered the 'failed' state with result 'exit-code'.
Jan 30 00:18:41 goku systemd[1]: Failed to start LSB: Create lightweight, portable, self-sufficient containers..
-- Subject: A start job for unit docker.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit docker.service has finished with a failure.
-- 
-- The job identifier is 12145 and the job result is failed.
Jan 30 00:18:41 goku sudo[197996]: pam_unix(sudo:session): session closed for user root

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

我有:

$ docker --version
Docker version 20.10.2, build 2291f61

$ lsb_release -a
LSB Version:    core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:    20.04
Codename:   focal

以下是我为重现该问题而遵循的安装说明:https://hangzhang.org/PyTorch-Encoding/notes/compile.html

相关内容