zoukankan      html  css  js  c++  java
  • 【转】Ubuntu 16 安装 python 依赖出现 error: command 'i686-linux-gnu-gcc' failed with exit status 1

    问题

    在 Ubuntu 下安装 python 依赖的时候出现以下错误

    build/temp.linux-i686-3.5/_openssl.c:498:30: fatal error: openssl/opensslv.h: No such file or directory
      compilation terminated.
      error: command 'i686-linux-gnu-gcc' failed with exit status 1
      
      ----------------------------------------
      Failed building wheel for cryptography
      Running setup.py clean for cryptography
    Failed to build cryptography
    
    
    
    i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c build/temp.linux-i686-3.5/_openssl.c -o build/temp.linux-i686-3.5/build/temp.linux-i686-3.5/_openssl.o -Wconversion -Wno-error=sign-conversion
        build/temp.linux-i686-3.5/_openssl.c:498:30: fatal error: openssl/opensslv.h: No such file or directory
        compilation terminated.
        error: command 'i686-linux-gnu-gcc' failed with exit status 1
        
        ----------------------------------------
    Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-rbtstpsj/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('
    ', '
    '), __file__, 'exec'))" install --record /tmp/pip-1vor2x2o-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-rbtstpsj/cryptography/
    

    在这里插入图片描述
    在这里插入图片描述

    解决办法

    sudo apt install python3 python-dev python3-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev python-pip
    

     系统的包安装完之后,即可正常安装 python 依赖

  • 相关阅读:
    深圳移动 神州行(大众卡/轻松卡/幸福卡)套餐资费(含香港日套餐)信息及使用方法
    PHP设置时区,记录日志文件的方法
    微信公众平台消息接口使用指南
    C#日期时间格式化
    使用CMD实现批量重命名[转]
    Python高效编程技巧
    实用WordPress后台MySQL操作命令
    ubuntu-wine
    Javascript 笔记与总结(2-8)对象2
    Swift5.3 语言指南(十) 枚举
  • 原文地址:https://www.cnblogs.com/hester/p/11441583.html
Copyright © 2011-2022 走看看