无法在Ubuntu 22.04.2上安装Docker。

huangapple go评论114阅读模式
英文:

Unable to install Docker on Ubuntu 22.04.2

问题

我正在按照Docker适用于Ubuntu的安装指南进行操作:https://docs.docker.com/engine/install/ubuntu/

我已经下载了Ubuntu的deb文件,当我运行Docker Desktop时,它显示以下错误:

无法在Ubuntu 22.04.2上安装Docker。

我也尝试了从Docker的apt存储库中设置和安装Docker Engine。

我在终端中运行了以下命令:

sudo apt-get update
sudo apt-get install ca-certificates curl gnupg

我有以下未满足的依赖关系。

以下软件包具有未满足的依赖关系:
 docker-desktop : 依赖于:qemu-system-x86 (>= 5.2.0) 但它将不会被安装
                  依赖于:docker-ce-cli 但它将不会被安装
                  依赖于:pass 但它将不会被安装
                  依赖于:uidmap
E: 未满足的依赖关系。尝试使用无软件包(或指定解决方案)的 'apt --fix-broken install'
我应该如何下载Docker,可以是从Docker Desktop,也可以是从apt存储库中下载。

<details>
<summary>英文:</summary>

I am following the installation guide on Docker for Ubuntu: https://docs.docker.com/engine/install/ubuntu/ 

I have downloaded the Ubuntu deb file, when i run Docker Desktop, it shows the following error:
[![enter image description here][1]][1]


  [1]: https://i.stack.imgur.com/VuXF1.png

I also tried Setting up and installing Docker Engine from Docker’s apt repository.

I ran this command in the terminal

sudo apt-get update
sudo apt-get install ca-certificates curl gnupg

I have the following unmet dependencies. 

The following packages have unmet dependencies:
docker-desktop : Depends: qemu-system-x86 (>= 5.2.0) but it is not going to be installed
Depends: docker-ce-cli but it is not going to be installed
Depends: pass but it is not going to be installed
Depends: uidmap
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


How do i download Docker, either from Docker Desktop or from the apt&#39;s repository 

</details>


# 答案1
**得分**: 1

你首先必须安装未满足依赖关系的软件包:

- qemu-system-x86
- docker-ce-cli
- pass
- uidmap

使用以下命令安装它们:

```bash
sudo apt-get install NAMEOFPACKAGE

此外,您可以运行以下命令来修复损坏或缺失的依赖关系:

sudo apt-get install -f

或者

apt --fix-broken install

也许进行更新/升级可能会有所帮助:

apt update && apt upgrade
英文:

You have to install the packages of the unmet depencies first:

  • qemu-system-x86
  • docker-ce-cli
  • pass
  • uidmap

Install them with:

sudo apt-get install NAMEOFPACKAGE

In addition you can run following command to fix broken or missing depencies:

sudo apt-get install -f

OR

apt --fix-broken install

Maybe an update / upgrade could be helpful

apt update &amp; apt-upgrade

huangapple
  • 本文由 发表于 2023年8月10日 22:05:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/76876492.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定