繁体   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