1. Reasons
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
2. Phenomenon
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
Similar Posts:
- CentOS8 Failed to start docker.service: Unit docker.service not found [How to Solve]
- How to Solve docker run Error: oci runtime error
- [Solved] Docker Container Start Error: iptables: No chain/target/match by that name
- [Solved] kuberlet Service Startup Error: “Failed to run kubelet” err=”failed to run Kubelet: misconfiguration: kubelet cgroup driver: \”systemd\” is different from docker cgroup driver: \”cgroupfs\””
- Maniaro distribution installation snap application error: classic confinement requires snaps under /snap or symlink from /snap to /var/lib/snapd/snap
- 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]
- Linux environment installation MYSQL Error: Redirecting to /bin/systemctl start mysqld.service Failed to start mysqld.service: Unit not found.
- [Solved] yarn Install Module Error:check python checking for Python executable “python2” in the PATH