命令'x86_64-linux-gnu-gcc'以退出状态1失败

时间:2021-07-10 11:14:07

I tried to install "scholarly" package, but I keep receiving this error:

我试图安装“学术”包,但我一直收到这个错误:

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/

Already tried the solutions in the following post, but it didnt work:

已经尝试过以下帖子中的解决方案,但它没有用:

pip install lxml error

pip install lxml错误

2 个解决方案

#1


49  

I had the same problem. This one helped me:

我有同样的问题。这个帮助了我:

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

If you using python3, try to replace python-dev with python3-dev

如果你使用python3,尝试用python3-dev替换python-dev

#2


1  

Install lib32ncurses5-dev:

安装lib32ncurses5-dev:

sudo apt-get install lib32ncurses5-dev

#1


49  

I had the same problem. This one helped me:

我有同样的问题。这个帮助了我:

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

If you using python3, try to replace python-dev with python3-dev

如果你使用python3,尝试用python3-dev替换python-dev

#2


1  

Install lib32ncurses5-dev:

安装lib32ncurses5-dev:

sudo apt-get install lib32ncurses5-dev