zoukankan      html  css  js  c++  java
  • 记一次用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-$(uname -s)-$(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
    

  • 相关阅读:
    (转)iPhone开发经典语录集锦
    在iPone环境下要保存数据
    DevExpress自定义控件 ComboBoxEdit ,RepositoryItemComboBox,实现按拼音字母检索
    常用IPHONE 编程 基础代码
    使用Locating 系统查询手机号码归属地
    JUnit4使用 实例+基础介绍
    5分钟快速了解JSON,实例项目动手做
    eclipse常用快捷键
    Ubuntu12.04下JDK、Eclipse的安装,在linux终端中用命令启动eclipse
    Jackson 框架,轻易转换JSON
  • 原文地址:https://www.cnblogs.com/felixqiang/p/11946644.html
Copyright © 2011-2022 走看看