依照官网提供的方法https://docs.docker.com/compose/install/, 会下载一个404的页面到/usr/local/bin下, 原因是系统不主流导致sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
指向了不存在的路径.
sudo pip install docker-compose
但是直接pip会提示缺少依赖导致错误:
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1145, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1133, in run_setup raise DistutilsError("Setup script exited with %s" % (v.args[0],)) distutils.errors.DistutilsError: Setup script exited with error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1 ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8KnQlf/pynacl/
安装依赖
sudo apt-get install -y libffi-dev gcc libc-dev make