Docker-compose:/usr/local/bin/docker-compose : line 1: Not: command not found [英] Docker-compose: /usr/local/bin/docker-compose : line 1: Not: command not found

查看:76
本文介绍了Docker-compose:/usr/local/bin/docker-compose : line 1: Not: command not found的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在安装了 Raspbian buster 的 Raspberry Pi 3+ 上安装 Docker-compose.我按照 docker.com 上的说明进行操作.输入命令后:sudo curl -L https://github.com/docker/compose/releases/download/1.20.0/docker-compose-`uname -s`-`uname -m` -o/usr/local/bin/docker-compose.它显示了一个下载表格

i'm trying to install Docker-compose on my Raspberry Pi 3+ which installed Raspbian buster. I followed instruction on docker.com. After I entered command : sudo curl -L https://github.com/docker/compose/releases/download/1.20.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose. It show a table for downloading

结果

似乎没有下载任何东西,只是在/usr/local/bin/docker-compose中保存了一个文件docker-compose.当我打开它时,它是空的.然后我输入命令 docker-compose -v,它显示错误 /usr/local/bin/docker-compose : line 1: Not: command not found.有人有解决办法吗?

It seems nothing downloaded, just have a file docker-compose saved in /usr/local/bin/docker-compose. When I opened it, it empty. Then I enter command docker-compose -v, it displayed error /usr/local/bin/docker-compose : line 1: Not: command not found. Anyone have solution?

推荐答案

这是因为在 raspberry pi 上命令的 url 部分导致

This is because on a raspberry pi the url part of the command results in

https://github.com/docker/compose/releases/download/1.24.1/docker-compose-Linux-armv7l

https://github.com/docker 查看最新的稳定版本/compose/releases/tag/1.24.1 你可以看到 armv7l 架构没有下载,所以文件是空的,因为没有什么可下载的.

Looking at the latest stable release at https://github.com/docker/compose/releases/tag/1.24.1 you can see there is no download for the armv7l architecture so the file is empty because there is nothing to download.

一旦我弄清楚如何在 Raspian 上安装 docker-compose 就会更新答案.

Will update answer once I figured out how to install docker-compose on Raspian.

通过 apt-get.注意:目前(2019 年 11 月 8 日)这会安装 1.21 版,这不是可用的最新版本.

Via apt-get. Note: Currently (Nov. 8 2019) this installs version 1.21 which is not the latest available.

sudo apt-get install docker-compose

通过 pip3.(安装最新)

sudo apt-get install python3-pip
sudo pip3 install docker-compose

然后用

sudo shutdown -r

这篇关于Docker-compose:/usr/local/bin/docker-compose : line 1: Not: command not found的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆