![錯誤:指令「x86_64-linux-gnu-gcc」失敗,退出狀態為 1(對於 lssl 和 lcrypto)](https://rvso.com/image/922424/%E9%8C%AF%E8%AA%A4%EF%BC%9A%E6%8C%87%E4%BB%A4%E3%80%8Cx86_64-linux-gnu-gcc%E3%80%8D%E5%A4%B1%E6%95%97%EF%BC%8C%E9%80%80%E5%87%BA%E7%8B%80%E6%85%8B%E7%82%BA%201%EF%BC%88%E5%B0%8D%E6%96%BC%20lssl%20%E5%92%8C%20lcrypto%EF%BC%89.png)
我已經嘗試安裝建議的任何內容,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.
答案1
試試sudo apt-get install python3.X-dev
X 是你的 python3 顛覆版本。
答案2
嘗試這個
sudo apt-get install libgmp-dev portaudio19-dev libssl-dev python3-dev
答案3
可能是 libssl:
sudo apt-get install libssl-dev
也試試這個:
sudo apt-get install portaudio19-dev
答案4
安裝這些軟體包:
sudo apt-get install libpcap-dev libssl-dev