sudo 服务 docker 启动后未运行,无法卸载



我使用官方文档安装了ubuntu的docker,但是当我尝试使用:

$ sudo service docker start
$ sudo service docker status
我收到回复说docker没有运行。我试图卸载软件包,但得到:

Removing docker-ce (5:20.10.8~3-0~ubuntu-focal) ...
invoke-rc.d: could not determine current runlevel
* Stopping Docker: docker                                                                                              start-stop-daemon: warning: failed to kill 2306: No such process
No process in pidfile '/var/run/docker-ssd.pid' found running; none killed.
invoke-rc.d: initscript docker, action "stop" failed.
dpkg: error processing package docker-ce (--remove):
installed docker-ce package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
dpkg: error while cleaning up:
installed docker-ce package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
docker-ce
Processing was halted because there were too many errors.

我搜索了很多其他类似的问题,但没有找到任何适合我的。我试着删除/var/lib/dpkg/info/docker-ce。但这也改变不了什么。我是Linux的绝对初学者,所以我会非常感谢任何帮助!

你试过这些命令吗,不知道但需要说:

要获取所有已安装的docker包,可以运行以下命令

sudo DPKG——list | grep docker

然后删除这些包

sudo DPKG -r——force-all [pastepackagesthatprinting]

最新更新