This is because I did not use the official installation package or apt to install docker, but I chose to install docker together when installing Ubuntu, so I installed it with snap
sudo systemctl restart docker
sudo service docker restart
sudo systemctl start docker.service
However, errors are always reported:
failed to restart docker.service: unit docker.service not found
3. Order to solve the problem
sudo snap restart docker
4. Other usages of snap package management tool
snap list To view the package installed by snap:
sudo snap restart docker Restart docker
sudo snap remove docker Uninstall docker
5. Uninstall and reinstall docker
6. Install docker-compose
- How to Solve docker run Error: oci runtime error
- Error message after installing docker in CentOS 7
- [Solved] docker: Error response from daemon: could not select device driver “” with capabilities: [[gpu]].
- Docker ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? [How to Solve]
- Job for docker.service failed because the control process exited with error code. See “syste…
- [Solved] Error in docker pull down image“ https://registry-1.docker.io/v2/ : Net / http: TLS handle timeout “how to handle?
- [Solved] http: server gave HTTP response to HTTPS client
- An error is reported when the docker command is executed in Jenkins
- Failed to start docker.service: Unit not found(Docker service does not start)
- This entry was posted in Linux and tagged Failed to restart docker.service: Unit docker.service not found, Ubuntu20.04 server Error on .