我无法在我的Linux系统上安装docker compose。运行安装命令后出现以下错误:
~$ sudo apt-get -f install docker-compose
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
code : Depends: libnotify4 but it is not going to be installed
Depends: libnss3 but it is not going to be installed
Depends: libxkbfile1 but it is not going to be installed
Depends: libgconf-2-4 but it is not going to be installed
Depends: libsecret-1-0 but it is not going to be installed
docker-compose : Depends: python-cached-property but it is not going to be installed
Depends: python-docker (>= 1.9.0) but it is not going to be installed
Depends: python-dockerpty (>= 0.4.1) but it is not going to be installed
Depends: python-docopt but it is not going to be installed
Depends: python-enum34 but it is not going to be installed
Depends: python-jsonschema but it is not going to be installed
Depends: python-requests (>= 2.6.1) but it is not going to be installed
Depends: python-six (>= 1.3.0) but it is not going to be installed
Depends: python-texttable but it is not going to be installed
Depends: python-websocket but it is not going to be installed
Depends: python-yaml but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
任何人都可以帮帮我吗?我试过sudo apt-get clean也没用[/ p>
答案 0 :(得分:2)
我认为安装docker-compose的最简单方法是通过pip:
sudo apt-get install python-pip
sudo pip install docker-compose
答案 1 :(得分:0)
Hellow,你不能得到包依赖。 Mayby你的系统是旧的,并且没有支持repozytory包,例如在Wheezy。梅比是其他问题。我现在不知道,因为你没有写关于你使用的系统的更多信息(例如系统版本,存储库列表 - cat /etc/apt/sources.list,et.t.c.)。我建议你使用这个官方教程在debian中使用官方docker页面安装docker-compose - src:https://docs.docker.com/compose/install/(你可以使用curl
下载最新的二进制docker-compose并使其适应使用或使用pip
工具安装docker-compose - 根据官方教程)或使用本页面中给出的解决方案(例如pip
工具)。我使用docker oficial tutorial在我的系统中重新安装docker-compose(到最新版本)。很有帮助。我使用Debian 9“Stretch”(最新的,稳定的)。
聚苯乙烯。当您使用其他解决方案安装docker-compose时,请不要忘记删除旧的安装docker-compose。
答案 2 :(得分:0)
你不需要安装docker compose。它可以从dockerhub作为docker图像,...所以你可以从docker运行它。
答案 3 :(得分:0)
在Linux系统上安装Docker Compose
1.运行以下命令以下载最新版本的Docker Compose:
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2。将可执行权限应用于二进制文件:
$ sudo chmod +x /usr/local/bin/docker-compose
3。测试安装。
$ docker-compose --version
有关更多详细信息,请参阅docker手册:https://docs.docker.com/compose/install/