2

我正在尝试做超级账本结构(设置环境),它需要 docker。我尝试搜索解决安装 docker 的互联网,但无济于事。以下是我尝试安装docker时遇到的错误。

在 git bash(git) 我尝试使用sudo apt-get install docker-engine. 但它说

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:
 Docker-engine: Depends: init-system-helpers (>= 1.13~) but it is not installable
                 Depends: sysv-rc (>= 2.88dsf-24) but 2.88dsf-13.10ubuntu11 is to be installed or
                          file-rc (>= 0.8.16) but it is not installable
                 Depends: libc6 (>= 2.17) but 2.15-0ubuntu10 is to be installed
                 Depends: libdevmapper1.02.1 (>= 2:1.02.63) but 2:1.02.48-4ubuntu7 is to be installed
                 Depends: libsystemd-journal0 (>= 201) but it is not installable
                 Recommends: aufs-tools but it is not going to be installed
                 Recommends: cgroupfs-mount but it is not installable or
                             cgroup-lite but it is not going to be installed
                 Recommends: git but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我已经按照这个网站的每一步安装 docker: https ://docs.docker.com/engine/installation/linux/ubuntulinux/

这是我尝试构建超级账本结构的网站(在 vagrant 之外构建的阶段,安装 docker): http ://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/build/

4

5 回答 5

6

清理无效的包仓库:

cd ../../etc/apt/sources.list.d
sudo rm docker.list

然后添加存储库并更新:

sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
sudo apt-get update
sudo apt-get install docker-engine
于 2017-03-01T21:52:22.257 回答
4

也许直接下载包libsystemd-journal0可以帮助你。

您可以下载某些 deb 文件然后使用dpkg命令安装它,但可能仍然存在一些依赖问题。所以你最好/etc/apt/source.list根据这个页面修改你的文件(如果你需要64位版本)。

至于libsystemd-journal0您可以在尾部之后添加以下行/etc/apt/sources.list

deb http://cz.archive.ubuntu.com/ubuntu trusty main

然后

sudo apt-get update

我想其他依赖问题可以用类似的方式解决。

于 2016-10-26T08:03:57.843 回答
1

idk 如果这可行,但试试这个:

sudo apt update

和,

sudo apt-get update

然后,

sudo apt install docker.io

在出现提示/要求时输入您的 sudo 密码,或者更好地以 root 身份登录。当我在我的 linux 发行版中安装 docker 时,我已经尝试过了。(卡利)。希望这对你也有用...... [也尝试更新你的 linux 发行版]

于 2021-06-07T06:26:41.767 回答
0

更新 sourcelist 文件中的 repos 并运行apt-get update将解决问题,

deb https://packages.docker.com/1.12/apt/repo/ ubuntu-xenial 主要 deb http://apt.dockerproject.org/repo/ ubuntu-trusty main

于 2018-08-16T17:15:56.017 回答
-2

将反向端口添加到您的 apt 存储库:“deb http://ftp.de.debian.org/debian wheezy-backports main”

并执行:

sudo apt-get update

然后,

sudo apt-get install docker-engine

应该可以完成。

于 2016-09-10T20:10:33.420 回答