记一次用pip安装docker-compose报错及解决方法

记一次用pip安装docker-compose报错及解决方法
Docker-Compose 的安装
方法一

下载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
Install Docker Compose

方法二
本人是用此方法安装的,期间的一些错误及解决方法

安装pip

安装 EPEL 软件包

sudo yum install epel-release

安装pip

sudo yum install -y python-pip

升级pip

sudo pip install --upgrade pip
安装docker-compose时报错
sudo pip install 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
最后再次安装docker-compose
sudo pip install docker-compose
安装成功

sudo docker-compose --version

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值