docker-compose安装

摘自 https://www.cnblogs.com/felixqiang/p/11946644.html

方法一

下载1.25.0 docker compose

sudo curl -L “https://github.com/docker/compose/releases/download/1.25.0/docker-compose- ( u n a m e − s ) − (uname -s)- (unames)(uname -m)” -o /usr/local/bin/docker-compose

添加可执行权限

sudo chmod +x /usr/local/bin/docker-compose

测试安装

sudo docker-compose --version

方法二

安装 EPEL 软件包

sudo yum install epel-release

安装pip

sudo yum install -y python-pip

升级pip

sudo pip install --upgrade pip

重新安装pip
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py

安装docker-compose

sudo pip install docker-compose

安装docker-compose报错及解决方法

第一次报错(sudo pip install docker-compose时)

ERROR: jsonschema 3.2.0 has requirement six>=1.11.0, but you'll have six 1.9.0 which is incompatible.

解决方法

sudo pip install six --user -U

第二次报错(sudo pip install docker-compose时)

ERROR: Cannot uninstall 'subprocess32'. It is a distutils installed project and thus we cannot accurately determine which >files belong to it which would lead to only a partial uninstall.

解决方法

# 搜索subprocess32-3.2.6-py2.7.egg-info文件
sudo find / -name *subpro*.egg-info
# 删除
rm -rf /usr/lib64/python2.7/site-packages/subprocess32-3.2.6-py2.7.egg-info

第三次报错(sudo pip install subprocess32 -U时)

configure: error: no acceptable C compiler found in $PATH

解决方法

sudo yum install -y  gcc 

第四次报错(sudo pip install subprocess32 -U时)

error: command 'gcc' failed with exit status 1

解决方法

# 安装openssl-devel
sudo yum install gcc libffi-devel python-devel openssl-devel -y

第五次报错(sudo pip install docker-compose时)

RROR: Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files >belong to it which would lead to only a partial uninstall.

解决方法

# 搜索requests-2.6.0-py2.7.egg-info文件
sudo find / -name *requests*.egg-info
# 删除
rm -rf /usr/lib/python2.7/site-packages/requests-2.6.0-py2.7.egg-info
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值