Command ' X86_64-LINUX-GNU-GCC ' failed with exit status 1 errors and Solutions

Source: Internet
Author: User
Tags openssl

Ubuntu16.04 When installing Scrapy (pip install scrapy), the following error is indicated:

Failed Building Wheel forCryptography Running setup.py Clean forcryptographyfailed to build Cryptographyerror:command'X86_64-LINUX-GNU-GCC'Failed with exit status1----------------------------------------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 code1 inch/tmp/pip-build-2wwgqs/cryptography/

Workaround, refer to: http://stackoverflow.com/questions/22073516/failed-to-install-python-cryptography-package-with-pip-and-setup-py

On Windows

If you're on the Windows you'll need to make sure you have OpenSSL installed. There is pre-compiled binaries available. If your installation is in a unusual location set the LIB and INCLUDE environment variables to INCLUDE the corresponding Locations. For example:

C:\> \path\to\vcvarsall.Bat x86_amd64c:\> Set LIB=c:\openssl- 1.0. 1f-64bit\lib;%lib< Span class= "pun" >%c:\> set Include=< Span class= "PLN" >c:\openssl-1.0 1f-64bit\include;%< Span class= "PLN" >include%c:\> pip Install cryptography               
Building Cryptography on Linux

Cryptography should build very easily on Linux provided are a C compiler, headers for Python (if you ' re not using PYP y), and headers for the OpenSSL and Libffi libraries available on your system.

For Debian and Ubuntu, the following command would ensure that the required dependencies is installed:

sudo apt-get install build-essential libssl-dev libffi-dev python-dev

For Fedora and Rhel-derivatives, the following command would ensure that the required dependencies is installed:

sudo yum install gcc libffi-devel python-devel openssl-devel

You should now is able to build and install cryptography with the usual.

pip install cryptography

Command ' X86_64-LINUX-GNU-GCC ' failed with exit status 1 errors and Solutions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.