Sudo Systemctl Start Docker Job for Docker. Service Failed Because the Control Process Exited with Error Code

I am trying to run someone's script:

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.

and

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..

and

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: 
-- 
-- 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: 
-- 
-- 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: 
-- 
-- 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: 
-- 
-- 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?

I have:

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

and

$ 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

Here's the installation instruction I am following for reproducing the problem:

1
Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article