gpt4 book ai didi

python -/usr/bin/ld : cannot find -lpython3. 6m

转载 作者:行者123 更新时间:2023-12-04 15:36:52 24 4
gpt4 key购买 nike

我正在尝试使用在链接 libpython 期间失败的 pip 安装 bitarray。

  Downloading https://repo/api/pypi/python/packages/packages/eb/fd/bf67cfea810305148ab8a1e8fbdcc5179f56979c73907fec9a36ebd4a58a/bitarray-1.2.0.tar.gz (48kB)
Installing collected packages: bitarray
Running setup.py install for bitarray: started
Running setup.py install for bitarray: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /opt/rp/python-3.6.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-80tjlaa0/bitarray/setup.py'"'"'; __file__='"'"'/tmp/pip-install-80tjlaa0/bitarray/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-lr_6fezd/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-80tjlaa0/bitarray/
Complete output (19 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/bitarray
copying bitarray/__init__.py -> build/lib.linux-x86_64-3.6/bitarray
copying bitarray/test_bitarray.py -> build/lib.linux-x86_64-3.6/bitarray
copying bitarray/test_util.py -> build/lib.linux-x86_64-3.6/bitarray
copying bitarray/util.py -> build/lib.linux-x86_64-3.6/bitarray
running build_ext
building 'bitarray._bitarray' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/bitarray
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -O -m64 -fPIC -I/opt/rp/python-3.6.9/include/python3.6m -c bitarray/_bitarray.c -o build/temp.linux-x86_64-3.6/bitarray/_bitarray.o
gcc -pthread -shared -m64 -Wl,-R/home/jenkins/workspace/python-centos7/python-3.6.9/lib,-R/opt/rp/mysql/lib build/temp.linux-x86_64-3.6/bitarray/_bitarray.o -L/home/jenkins/workspace/centos7/python-3.6.9/lib -lpython3.6m -o build/lib.linux-x86_64-3.6/bitarray/_bitarray.cpython-36m-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lpython3.6m
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/alu-rp/python-3.6.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-80tjlaa0/bitarray/setup.py'"'"'; __file__='"'"'/tmp/pip-install-80tjlaa0/bitarray/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-lr_6fezd/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

但我可以看到 Libpython.so 文件
/opt/rp/python-3.6.9/lib/libpython3.6m.so.1.0
/opt/rp/python-3.6.9/lib/libpython3.6m.so
/opt/rp/python-3.6.9/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a

还有我的 $LD_LIBRARY_PATH/opt/rp/python-3.6.9/lib:/opt/rp/mysql/lib:/opt/rp/python-3.6.9/lib:/opt/rp/mysql/lib .

如何链接libpython使安装完成

最佳答案

我认为您需要在 LIBRARY_PATH 和 LD_LIBRARY_PATH 中包含 libpython3.6m.so 目录。在链接时搜索前者。后者在运行时。

关于python -/usr/bin/ld : cannot find -lpython3. 6m,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59456446/

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