欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

启动docker服务的时候报错:Failed to start docker.service: Unit docker.service is masked.

程序员文章站 2022-07-10 20:23:20
...

错误描述

启动docker服务的时候报错:Failed to start docker.service: Unit docker.service is masked.

解决方案

依次输入

sudo systemctl unmask docker
sudo systemctl start docker

可能遇到的问题

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

输入提示的命令

sudo systemctl status docker.service
journalctl -xe

再次输入

sudo systemctl start docker

最后就能用service指令启动docker了~