我使用的是基于Ubuntu 18的薄荷19.2。
我使用apt purge
卸载,然后删除文件夹。最后,使用来自官方网站的命令重新安装Docker。
然而,当我运行命令docker -v
或sudo docker -v
时,我得到了响应:
command not found: docker
当我运行命令:sudo apt-get install docker-ce docker-ce-cli containerd.io
时,我得到:
Reading package lists... Done
Building dependency tree
Reading state information... Done
containerd.io is already the newest version (1.2.10-3).
docker-ce-cli is already the newest version (5:19.03.4~3-0~ubuntu-bionic).
docker-ce is already the newest version (5:19.03.4~3-0~ubuntu-bionic).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
我如何纠正这一问题,使码头可在全球范围内访问?
发布于 2019-11-13 18:09:56
我认为问题在于存在冲突&即使是我按照官方网站的指示,系统也没有正确地移除码头。
然而,对我起作用的是清除所有与码头有关的东西。
sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-compose
然后,我从/var/lib
文件夹中删除了docker文件夹。
为保证而重新启动。然后按照官方文档重新安装。
重新启动之后,它就起作用了。
别忘了,docker-compose
需要单独安装。
https://unix.stackexchange.com/questions/551964
复制相似问题