簡體   English   中英

Docker 不會安裝在 Ubuntu 18.04 上

[英]Docker won't install on Ubuntu 18.04

我正在嘗試按照說明安裝。

嘗試安裝時出錯:

# sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 containerd.io : Depends: libseccomp2 (>= 2.5.0) but 2.4.3-1ubuntu3.18.04.3 is to be installed
E: Unable to correct problems, you have held broken packages.

操作系統:

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:    18.04
Codename:   bionic

# apt-get upgrade && apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Docker 回購:

# cat /etc/apt/sources.list.d/docker.list 
deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu   bionic stable

我試圖查找有關如何為 Ubuntu 18.04 更新 libseccomp2 的信息,但沒有找到任何信息。 有沒有人遇到過這樣的問題?

我遇到了同樣的問題並從源代碼構建它。

取消注釋/etc/apt/sources.list中的deb-src行,然后:

mkdir foo && cd foo
sudo apt-get update
sudo apt build-dep libseccomp2
apt-get source --compile libseccomp2
sudo dpkg -i libseccomp2_*.deb

它在構建后運行大量測試,這很耗時。 要跳過那些在apt-get source步驟之前添加的內容:

export DEB_BUILD_OPTIONS=nocheck

之后,我能夠安裝 Docker。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM