web-dev-qa-db-ja.com

コマンド 'x86_64-linux-gnu-gcc'は終了ステータス1で失敗しました

「学術」パッケージをインストールしようとしましたが、このエラーが引き続き表示されます。

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
build/temp.linux-x86_64-2.7/_openssl.c:434:30: fatal error: openssl/opensslv.h: No such file or directory
compilation terminated.

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-0OXGEx/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EdgZGB-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-0OXGEx/cryptography/

次の投稿ですでに解決策を試しましたが、うまくいきませんでした:

pip install lxml error

23
msmazh

同じ問題がありました。これは私を助けました:

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

Python3を使用している場合は、python-devpython3-devに置き換えてください。

59

Lib32ncurses5-devをインストールします。

Sudo apt-get install lib32ncurses5-dev
4
Rastin