bash 无法安装 docker
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39403497/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unable to install docker
提问by qcc
I am trying to do hyperledger fabric(setting up the environment) and it required docker. I tried searching the internet of solving to install docker but it was to no avail. The following is the errors encountered when I tried to install dockers.
我正在尝试做超级账本结构(设置环境)并且它需要 docker。我尝试在解决安装 docker 的互联网上搜索,但无济于事。以下是我尝试安装dockers时遇到的错误。
At git bash(git) I tried to use sudo apt-get install docker-engine
. But it says
在 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.
I have followed every single step of this website in installing docker: https://docs.docker.com/engine/installation/linux/ubuntulinux/
我已经按照本网站的每一步安装 docker:https: //docs.docker.com/engine/installation/linux/ubuntulinux/
This is the website I have tried to build hyperledger fabric (At the stage of building outside of vagrant, installing docker): http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/build/
这是我尝试构建超级账本结构的网站(在 vagrant 之外构建阶段,安装 docker):http: //hyperledger-fabric.readthedocs.io/en/latest/dev-setup/build/
回答by Jocelyn Tran
Clean up the invalid package repository:
清理无效的包存储库:
cd ../../etc/apt/sources.list.d
sudo rm docker.list
Then add the repository and update:
然后添加存储库并更新:
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
sudo apt-get update
sudo apt-get install docker-engine
回答by Gavin
Maybe the direct package download for libsystemd-journal0
can help you.
也许直接包下载libsystemd-journal0
可以帮助你。
You can download certain deb file then install it using dpkg
command, but there may still be some dependency problems. So you'd better modify your /etc/apt/source.list
file according to this page(if you need a 64-bit version).
可以下载某个deb文件,然后使用dpkg
命令安装,但是可能还是存在一些依赖问题。所以你最好/etc/apt/source.list
根据这个页面修改你的文件(如果你需要64位版本)。
As for libsystemd-journal0
you can add the following line after the tail of /etc/apt/sources.list
:
至于libsystemd-journal0
您可以在 的尾部后添加以下行/etc/apt/sources.list
:
deb http://cz.archive.ubuntu.com/ubuntu trusty main
then
然后
sudo apt-get update
I guess other dependency problems can be solved in a similar way.
我想其他依赖问题可以用类似的方式解决。
回答by Rupeshrams
Update the repos in sourcelist file and run apt-get update
that will fix the issue,
更新源列表文件中的存储库并运行apt-get update
以解决问题,
deb https://packages.docker.com/1.12/apt/repo/ubuntu-xenial main deb http://apt.dockerproject.org/repo/ubuntu-trusty main
deb https://packages.docker.com/1.12/apt/repo/ubuntu-xenial 主 deb http://apt.dockerproject.org/repo/ubuntu- trusty main
回答by Saurabh
Add backports to your apt repo : "deb http://ftp.de.debian.org/debianwheezy-backports main"
将向后移植添加到您的 apt 存储库:“deb http://ftp.de.debian.org/debianwheezy-backports main”
and perform a :
并执行:
sudo apt-get update
Afterwards,
然后,
sudo apt-get install docker-engine
should complete fine.
应该可以完成。