无法在 Ubuntu 20.04 LTS 上安装 docker

Bra*_*bad 2 apt docker 20.04

我是 docker 和 linux 的新手,我尝试在我的新 Ubuntu 20.04 LTS 上安装 docker。

\n\n

我遵循这些说明:https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04

\n\n

当我到达此命令时:sudo apt install docker-ce,我收到此错误:

\n\n
Reading package lists... Done\nBuilding dependency tree       \nReading state information... Done\ndocker-ce is already the newest version (5:19.03.9~3-0~ubuntu-focal).\n0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\n1 not fully installed or removed.\nAfter this operation, 0 B of additional disk space will be used.\nDo you want to continue? [Y/n] y\nSetting up docker-ce (5:19.03.9~3-0~ubuntu-focal) ...\nJob for docker.service failed because the control process exited with error code.\nSee "systemctl status docker.service" and "journalctl -xe" for details.\ninvoke-rc.d: initscript docker, action "start" failed.\n\xe2\x97\x8f docker.service - Docker Application Container Engine\n     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)\n     Active: activating (auto-restart) (Result: exit-code) since Sat 2020-05-23 22:00:38 CES\nT; 8ms ago\nTriggeredBy: \xe2\x97\x8f docker.socket\n       Docs: https://docs.docker.com\n    Process: 15674 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containe\nrd.sock (code=exited, status=1/FAILURE)\n   Main PID: 15674 (code=exited, status=1/FAILURE)\ndpkg: error processing package docker-ce (--configure):\n installed docker-ce package post-installation script subprocess returned error exit status \n1\nErrors were encountered while processing:\n docker-ce\nE: Sub-process /usr/bin/dpkg returned an error code (1)\n
Run Code Online (Sandbox Code Playgroud)\n\n

有人可以帮我解决这个问题吗?

\n\n

出于学习目的,我想知道出了什么问题以及原因。但只要这再次有效,就不是强制性的。

\n\n

非常感谢。

\n

小智 5

我遇到了一些类似的错误,这是由于我的 VPN 干扰 docker 创建网络接口而导致的。关闭我的 VPN 后它就可以工作了。