【问题标题】:Error installing docker安装 docker 时出错
【发布时间】:2017-08-04 16:42:30
【问题描述】:

按照说明安装docker:

https://docs.docker.com/engine/installation/linux/docker-ee/ubuntu/#install-using-the-repository

我有错误:

E: Unable to locate package docker-ee

更新包索引时返回错误:

W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/trusty/InRelease  Unable to find expected entry 'stable-17.03/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

这是什么错误?

ps

lsb_release
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:    14.04
Codename:   trusty

uname -a
Linux dev-Cherepanov 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

【问题讨论】:

标签: linux ubuntu docker


【解决方案1】:

对于 ubuntu 14.04 linux-image-extra-* 软件包有一些额外的软件包,它们允许 Docker EE 使用 aufs 存储驱动程序,这里是它们的命令:

 $ sudo apt-get update

$ sudo apt-get install \
    linux-image-extra-$(uname -r) \
    linux-image-extra-virtual

然后设置存储库:

$ sudo apt-get update
$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common
 $ curl -fsSL <DOCKER-EE-URL>/ubuntu/gpg | sudo apt-key add -
$ apt-key fingerprint 6D085F96

pub   4096R/6D085F96 2017-02-22
    Key fingerprint = DD91 1E99 5A64 A202 E859  07D6 BC14 F10B 6D08 5F96
uid       [ultimate] Docker Release (EE deb) <docker@docker.com>
sub   4096R/91A29FA3 2017-02-22
$ sudo add-apt-repository \
   "deb [arch=amd64] <DOCKER-EE-URL>/ubuntu \
   $(lsb_release -cs) \
   stable-17.03"

docker-ee的最后安装步骤:-

$ sudo apt-get update
$ sudo apt-get install docker-ee

希望这对你有用。

【讨论】:

  • 我之前安装了这些包
  • 尝试完全删除 docker 并重新安装它,这是留给你的选项,因为我安装它时出现问题,但我按照上述操作进行操作。
【解决方案2】:

你可以尝试运行

$ sudo add-apt-repository \
    "deb [arch=amd64] <DOCKER-EE-URL>/ubuntu \
    $(lsb_release -cs) \
    stable"

不是

$sudo add-apt-repository \
   "deb [arch=amd64] <DOCKER-EE-URL>/ubuntu \
   $(lsb_release -cs) \
   stable-17.03"

然后

$ sudo apt-get update
$ sudo apt-get install docker-ee

【讨论】:

    猜你喜欢
    • 2019-03-08
    • 2018-12-26
    • 1970-01-01
    • 2020-06-07
    • 2019-10-24
    • 1970-01-01
    • 1970-01-01
    • 2019-05-22
    • 2019-10-19
    相关资源
    最近更新 更多