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
    

  • 相关阅读:
    Can't locate ... in @INC
    c++写一个类后编译发现class重定义
    python with
    遍历Java Map
    mod_jk notes
    NPM使用总结
    Yeoman
    Java中的Marker Interfaces有什么用
    有关Ehcache的内容的引用和Java的deep copy
    JDBC的PreparedStatement语句使用记录
  • 原文地址:https://www.cnblogs.com/felixqiang/p/11946644.html
Copyright © 2011-2022 走看看