ошибка: команда 'x86_64-linux-gnu-gcc' завершилась неудачно со статусом выхода 1 (для lssl и lcrypto)

Я пробовал установить все, что было предложено, libssl-dev был наиболее частым ответом, но я все равно получаю сообщение об ошибке:

PyAPI_FUNC(PyObject *) PyInt_FromString(char*, char**, int);
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/MySQLdb/_mysql.o -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl -o build/lib.linux-x86_64-2.7/MySQLdb/_mysql.so
    /usr/bin/ld: cannot find -lssl
    /usr/bin/ld: cannot find -lcrypto
    collect2: error: ld returned 1 exit status
   error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
   ----------------------------------------
 ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cujwKQ/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cujwKQ/mysqlclient/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-record-dlLRwV/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
 WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
 You should consider upgrading via the 'pip install --upgrade pip' command.
0
задан 24 March 2020 в 20:50

3 ответа

Попробуйте sudo apt-get install python3.X-dev, где X — ваша подрывная версия python3.

8
ответ дан 2 May 2020 в 15:45

Может быть libssl:

sudo apt-get install libssl-dev

Также попробуйте это:

sudo apt-get install portaudio19-dev
0
ответ дан 19 August 2020 в 06:20

В большинстве случаев это проблемы с зависимостями. При возникновении этой ошибки обратите внимание, что перед ошибкой может быть указано, что вам не хватает пакета или файла заголовка — вы должны найти их, установить и проверить, работает ли он.

Для использования Python 2.x:

$ sudo apt-get install python-dev

Если вы используете python3, попробуйте заменить python-dev на python3-dev

Для определенной версии Python 3 замените x на минорный версия в

$ sudo apt-get install python3.x-dev
0
ответ дан 7 October 2020 в 05:55

Другие вопросы по тегам:

Похожие вопросы: