ztxz16 / fastllm

纯c++的全平台llm加速库,支持python调用,chatglm-6B级模型单卡可达10000+token / s,支持glm, llama, moss基座,手机端流畅运行
Apache License 2.0
3.31k stars 338 forks source link

/home/jwkj/miniconda3/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found #339

Open zxzxde opened 1 year ago

zxzxde commented 1 year ago

Traceback (most recent call last): File "/home/GC/Gits/Baichuan2/test_fastllm.py", line 5, in from fastllm_pytools import llm File "/home/GC/Gits/Baichuan2/venv/lib/python3.11/site-packages/fastllm_pytools-0.0.1-py3.11.egg/fastllm_pytools/llm.py", line 11, in fastllm_lib = ctypes.cdll.LoadLibrary(os.path.join(os.path.split(os.path.realpath(file))[0], "libfastllm_tools.so")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jwkj/miniconda3/lib/python3.11/ctypes/init.py", line 454, in LoadLibrary return self._dlltype(name) ^^^^^^^^^^^^^^^^^^^ File "/home/jwkj/miniconda3/lib/python3.11/ctypes/init.py", line 376, in init self._handle = _dlopen(self._name, mode) ^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: /home/jwkj/miniconda3/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/GC/Gits/Baichuan2/venv/lib/python3.11/site-packages/fastllm_pytools-0.0.1-py3.11.egg/fastllm_pytools/libfastllm_tools.so)

奇怪,系统安装了miniconda3, 但是环境使用的还是venv,为什么到miniconda上去了。 /lib/x86_64-linux-gnu目录下没有libstdc++.so.6

exceedzhang commented 10 months ago

遇到类似问题,有谁知道如何解决吗?

Whylickspittle commented 1 month ago

更新 GCC: sudo apt update sudo apt install build-essential sudo apt install gcc

再软链接新版本的 libstdc++: sudo ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /opt/conda/lib/libstdc++.so.6