英文:
Unable to install Docker on Ubuntu 22.04.2
问题 {#heading}
我正在按照Docker适用于Ubuntu的安装指南进行操作:https://docs.docker.com/engine/install/ubuntu/
我已经下载了Ubuntu的deb文件,当我运行Docker Desktop时,它显示以下错误:
我也尝试了从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]: http://static.51tbox.com/static/2024-11-29/col/bcbdf3711a47181c0fd7fbbcaa804e87/46e4a1903b7d4915ba5966abc3d42335.png.jpg
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's repository
\</details\>
答案1
===
得分: 1
你首先必须安装未满足依赖关系的软件包:
* qemu-system-x86
* docker-ce-cli
* pass
* uidmap
使用以下命令安装它们:
```bash
sudo apt-get install NAMEOFPACKAGE
</code></pre>
<p>此外,您可以运行以下命令来修复损坏或缺失的依赖关系:</p>
<pre tabindex="0" style="color:#f8f8f2;background-color:#272822;"><code><span style="display:flex;"><span>sudo apt-get install -f
</span></span></code></pre>
<p>或者</p>
<pre tabindex="0" style="color:#f8f8f2;background-color:#272822;"><code><span style="display:flex;"><span>apt --fix-broken install
</span></span></code></pre>
<p>也许进行更新/升级可能会有所帮助:</p>
<pre tabindex="0" style="color:#f8f8f2;background-color:#272822;"><code><span style="display:flex;"><span>apt update <span style="color:#f92672">&&</span> apt upgrade
</span></span></code></pre>
<details>
<summary>英文:</summary>
<p>You have to install the packages of the unmet depencies first:</p>
<ul>
<li>qemu-system-x86</li>
<li>docker-ce-cli</li>
<li>pass</li>
<li>uidmap</li>
</ul>
<p>Install them with:</p>
<pre><code>sudo apt-get install NAMEOFPACKAGE
</code></pre>
<p>In addition you can run following command to fix broken or missing depencies:</p>
<pre><code>sudo apt-get install -f
</code></pre>
<p>OR</p>
<pre><code>apt --fix-broken install
</code></pre>
<p>Maybe an update / upgrade could be helpful</p>
<pre><code>apt update &amp; apt-upgrade
</code></pre>
</details>
<p></p>
</div>
```