[GH-ISSUE #241] whent import cpuinfer_ext,ImportError: /lib64/libc.so.6: version `GLIBC_2.34' #143

Closed
opened 2026-10-29 14:34:54 +00:00 by bsakaguchi · 5 comments
Owner

Originally created by @cskkx1 on GitHub (Feb 14, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/241

ktransformers) [root@yfaicompute4 ktransformers]# python -m ktransformers.local_chat --model_path deepseek-ai/DeepSeek-R1 --gguf_path /data1/models/DeepSeek-R1-GGUF/DeepSeek-R1-Q4_K_M/ --prompt_file prompts.txt --max_new_tokens 1000
using custom modeling_xxx.py.
using default_optimize_rule for DeepseekV3ForCausalLM
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/data/code/ktransformers/ktransformers/local_chat.py", line 179, in
fire.Fire(local_chat)
File "/data/miniconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 135, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/miniconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 468, in _Fire
component, remaining_args = _CallAndUpdateTrace(
^^^^^^^^^^^^^^^^^^^^
File "/data/miniconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 684, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/data/code/ktransformers/ktransformers/local_chat.py", line 110, in local_chat
optimize_and_load_gguf(model, optimize_rule_path, gguf_path, config)
File "/data/code/ktransformers/ktransformers/optimize/optimize.py", line 128, in optimize_and_load_gguf
inject(module, optimize_config, model_config, gguf_loader)
File "/data/code/ktransformers/ktransformers/optimize/optimize.py", line 31, in inject
module_cls=getattr(import(import_module_name, fromlist=[""]), import_class_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/code/ktransformers/ktransformers/operators/models.py", line 22, in
from ktransformers.operators.dynamic_attention import DynamicScaledDotProductAttention
File "/data/code/ktransformers/ktransformers/operators/dynamic_attention.py", line 19, in
from ktransformers.operators.cpuinfer import CPUInfer, CPUInferKVCache
File "/data/code/ktransformers/ktransformers/operators/cpuinfer.py", line 25, in
import cpuinfer_ext
ImportError: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /data/miniconda3/envs/ktransformers/lib/python3.11/site-packages/cpuinfer_ext.cpython-311-x86_64-linux-gnu.so)

centos7.9系统版本,glibc2.34安装没安上,大家有解决办法吗

Originally created by @cskkx1 on GitHub (Feb 14, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/241 ktransformers) [root@yfaicompute4 ktransformers]# python -m ktransformers.local_chat --model_path deepseek-ai/DeepSeek-R1 --gguf_path /data1/models/DeepSeek-R1-GGUF/DeepSeek-R1-Q4_K_M/ --prompt_file prompts.txt --max_new_tokens 1000 using custom modeling_xxx.py. using default_optimize_rule for DeepseekV3ForCausalLM Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/data/code/ktransformers/ktransformers/local_chat.py", line 179, in <module> fire.Fire(local_chat) File "/data/miniconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 135, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/miniconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 468, in _Fire component, remaining_args = _CallAndUpdateTrace( ^^^^^^^^^^^^^^^^^^^^ File "/data/miniconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 684, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^ File "/data/code/ktransformers/ktransformers/local_chat.py", line 110, in local_chat optimize_and_load_gguf(model, optimize_rule_path, gguf_path, config) File "/data/code/ktransformers/ktransformers/optimize/optimize.py", line 128, in optimize_and_load_gguf inject(module, optimize_config, model_config, gguf_loader) File "/data/code/ktransformers/ktransformers/optimize/optimize.py", line 31, in inject module_cls=getattr(__import__(import_module_name, fromlist=[""]), import_class_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/code/ktransformers/ktransformers/operators/models.py", line 22, in <module> from ktransformers.operators.dynamic_attention import DynamicScaledDotProductAttention File "/data/code/ktransformers/ktransformers/operators/dynamic_attention.py", line 19, in <module> from ktransformers.operators.cpuinfer import CPUInfer, CPUInferKVCache File "/data/code/ktransformers/ktransformers/operators/cpuinfer.py", line 25, in <module> import cpuinfer_ext ImportError: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /data/miniconda3/envs/ktransformers/lib/python3.11/site-packages/cpuinfer_ext.cpython-311-x86_64-linux-gnu.so) centos7.9系统版本,glibc2.34安装没安上,大家有解决办法吗
bsakaguchi 2026-10-29 14:34:54 +00:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@shuchong commented on GitHub (Feb 14, 2025):

我通过安装:conda install -c conda-forge libstdcxx-ng
解决的

<!-- gh-comment-id:2658068659 --> @shuchong commented on GitHub (Feb 14, 2025): 我通过安装:conda install -c conda-forge libstdcxx-ng 解决的
Author
Owner

@cskkx1 commented on GitHub (Feb 14, 2025):

conda install -c conda-forge libstdcxx-ng

centos7? It didn't work on me

<!-- gh-comment-id:2658110757 --> @cskkx1 commented on GitHub (Feb 14, 2025): > conda install -c conda-forge libstdcxx-ng centos7? It didn't work on me
Author
Owner

@BruceYu-D20 commented on GitHub (Feb 14, 2025):

ubuntu 22.04 碰到过同样的问题,

确保/home/conda/envs/ktransformers/libstdc++.so.6中有3.4.30,查看方法

strings ./ktransformers/lib/libstdc++.so.6 | grep GLIBCXX

更新

conda install -c conda-forge libstdcxx-ng

<!-- gh-comment-id:2658393781 --> @BruceYu-D20 commented on GitHub (Feb 14, 2025): ubuntu 22.04 碰到过同样的问题, # 确保/home/conda/envs/ktransformers/libstdc++.so.6中有3.4.30,查看方法 strings ./ktransformers/lib/libstdc++.so.6 | grep GLIBCXX # 更新 conda install -c conda-forge libstdcxx-ng
Author
Owner

@cskkx1 commented on GitHub (Feb 14, 2025):

centos7建议别用了,直接升系统

<!-- gh-comment-id:2658444450 --> @cskkx1 commented on GitHub (Feb 14, 2025): centos7建议别用了,直接升系统
Author
Owner

@ErvinXie commented on GitHub (Dec 11, 2025):

This issue has been automatically closed due to inactivity for 60 days.

If you believe this issue is still relevant, please feel free to reopen it with additional information or context.

Thank you for your contribution to KTransformers!


此 issue 因超过 60 天无活动而被自动关闭。

如果您认为此问题仍然存在,请随时重新打开并提供更多信息或上下文。

感谢您对 KTransformers 的贡献!

<!-- gh-comment-id:3639886499 --> @ErvinXie commented on GitHub (Dec 11, 2025): This issue has been automatically closed due to inactivity for 60 days. If you believe this issue is still relevant, please feel free to reopen it with additional information or context. Thank you for your contribution to KTransformers! --- 此 issue 因超过 60 天无活动而被自动关闭。 如果您认为此问题仍然存在,请随时重新打开并提供更多信息或上下文。 感谢您对 KTransformers 的贡献!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#143
No description provided.