gpt4 book ai didi

python - 命令 'x86_64-linux-gnu-gcc' 失败,退出状态为 1

转载 作者:IT老高 更新时间:2023-10-28 20:24:03 26 4
gpt4 key购买 nike

我尝试安装“scholarly”包,但一直收到此错误:

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

最佳答案

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

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

如果您使用的是 python3,请尝试将 python-dev 替换为 python3-dev

关于python - 命令 'x86_64-linux-gnu-gcc' 失败,退出状态为 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41492878/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com