command 'x86_64-linux-gnu-gcc' failed with exit status 1错误及解决方案
Posted marost
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了command 'x86_64-linux-gnu-gcc' failed with exit status 1错误及解决方案相关的知识,希望对你有一定的参考价值。
Ubuntu16.04安装Scrapy(pip install Scrapy)时提示错误如下:
Failed building wheel for cryptography Running setup.py clean for cryptography Failed to build cryptography error: command ‘x86_64-linux-gnu-gcc‘ failed with exit status 1 ---------------------------------------- Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__=‘/tmp/pip-build-2wwgqS/cryptography/setup.py‘;f=getattr(tokenize, ‘open‘, open)(__file__);code=f.read().replace(‘\r\n‘, ‘\n‘);f.close();exec(compile(code, __file__, ‘exec‘))" install --record /tmp/pip-IPpc2q-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-2wwgqS/cryptography/
解决办法,参考:http://stackoverflow.com/questions/22073516/failed-to-install-python-cryptography-package-with-pip-and-setup-py
On Windows
If you’re on Windows you’ll need to make sure you have OpenSSL installed. There are pre-compiled binaries available. If your installation is in an unusual location set the LIB and INCLUDE environment variables to include the corresponding locations. For example:
C:\> \path\to\vcvarsall.bat x86_amd64
C:\> set LIB=C:\OpenSSL-1.0.1f-64bit\lib;%LIB%
C:\> set INCLUDE=C:\OpenSSL-1.0.1f-64bit\include;%INCLUDE%
C:\> pip install cryptography
Building cryptography on Linux
cryptography should build very easily on Linux provided you have a C compiler, headers for Python (if you’re not using pypy), and headers for the OpenSSL and libffi libraries available on your system.
For Debian and Ubuntu, the following command will ensure that the required dependencies are installed:
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
For Fedora and RHEL-derivatives, the following command will ensure that the required dependencies are installed:
sudo yum install gcc libffi-devel python-devel openssl-devel
You should now be able to build and install cryptography with the usual.
pip install cryptography
以上是关于command 'x86_64-linux-gnu-gcc' failed with exit status 1错误及解决方案的主要内容,如果未能解决你的问题,请参考以下文章
词云:解决pip install wordcloud安装过程中报错“error: command 'x86_64-linux-gnu-gcc' failed with exit sta
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
x86_64-linux-gnu/libgdk-x11-2.0.so: error adding symbols: DSO missing from command line
error: command ‘x86_64-linux-gnu-gcc‘ failed
invalid configuration x86_64-unknown-linux-gnu' machine x86_64-unknown' not recognized