docker-desktop
我正在尝试安装这里。我下载了以下.deb
软件包:
sudo dpkg -i docker-desktop-4.8.1-amd64.deb
但我遇到了几个缺少依赖项的问题:
(Reading database ... 422535 files and directories currently installed.)
Preparing to unpack docker-desktop-4.8.1-amd64.deb ...
Unpacking docker-desktop (4.8.1-78998) over (4.8.1-78998) ...
dpkg: dependency problems prevent configuration of docker-desktop:
docker-desktop depends on docker-ce-cli; however:
Package docker-ce-cli is not installed.
docker-desktop depends on pass; however:
Package pass is not installed.
dpkg: error processing package docker-desktop (--install):
dependency problems - leaving unconfigured
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for bamfdaemon (0.5.6+22.04.20220217-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Errors were encountered while processing:
docker-desktop
我尝试使用以下方法安装缺少的依赖项:
sudo apt-get -f install
但它仍然返回与上述相同的错误消息。
答案1
您可以通过运行以下命令来修复此问题:
更新并安装依赖项
sudo apt-get update sudo apt-get install ca-certificates curl gnupg lsb-release
设置 Docker 存储库
sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
安装docker引擎
sudo apt update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
安装 Docker Desktop(您必须先从以下文档中的步骤 2 下载 deb 包:安装 Docker Dekstop)
sudo apt-get install ./docker-desktop-<version>-<arch>.deb
更多信息请点击这里:
答案2
Docker Desktop 依赖于universe
存储库中的一些软件包。因此,如果尚不存在,则需要添加:
sudo add-apt-repository universe
然后,按照这些指示。
使用此命令来安装:sudo apt-get install ./docker-desktop-<version>-<arch>.deb
,并且您的依赖关系将在安装过程中得到解决。
dpkg
是一种低级工具,它不会自动解决依赖关系。apt-get
(和apt
)是使用 的高级工具dpkg
,但也会为您解决依赖关系。
答案3
答案4
我遇到了同样的问题,
我通过安装docker引擎解决了它https://docs.docker.com/engine/install/ubuntu/#set-up-the-repository
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
然后sudo apt-get install ./docker-desktop-<version>-<arch>.deb