所以这些是Docker 的安装说明
设置 GPG 密钥和先决条件后,它基本上包括:
.deb
从发布页面获取(最新)发布sudo apt install ./docker-desktop-<version>-<arch>.deb
我收到以下错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'docker-desktop' instead of './docker-desktop-4.8.1-amd64.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
docker-desktop : PreDepends: init-system-helpers (>= 1.54~) but 1.51 is to be installed
E: Unable to correct problems, you have held broken packages.
但是,如果我尝试过sudo apt upgrade init-system-helpers
,那么我得到了:
Reading package lists... Done
Building dependency tree
Reading state information... Done
init-system-helpers is already the newest version (1.51).
安装Docker的解决方案是什么?
经过一番谷歌搜索,这个解决方案被证明是有用的:
wget http://ftp.kr.debian.org/debian/pool/main/i/init-system-helpers/init-system-helpers_1.60_all.deb
sudo apt install ./init-system-helpers_1.60_all.deb
sudo apt install ./docker-desktop-4.8.1-amd64.deb
虽然手动安装更新版本
init-system-helpers
可能适用于私人安装或作为临时解决方法,但更稳定的解决方案似乎是将 Ubuntu 版本升级到至少 Focal 并希望 docker 人员不会提高依赖性这么快又来了。由于各种其他原因,这可能也很困难,但这里的关键见解似乎是 Docker - 尽管在他们的文档中另有说明 - 不支持Bionic(至少
docker-desktop
不支持,对于 docker 的其他部分可能会有所不同)。