Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker启动报错libgthread-2.0.so.0: cannot open shared object file: No such file or directory(v1.9.0) #521

Open
JiyongShi opened this issue Jan 24, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@JiyongShi
Copy link

问题描述

1.9.0 docker启动报错:
/usr/local/lib/python3.12/site-packages/stanza/models/common/beam.py:6: SyntaxWarning: invalid escape sequence '\ '
"""
Traceback (most recent call last):
File "/usr/local/bin/pdf2zh", line 4, in
from pdf2zh.pdf2zh import main
File "/usr/local/lib/python3.12/site-packages/pdf2zh/init.py", line 2, in
from pdf2zh.high_level import translate, translate_stream
File "/usr/local/lib/python3.12/site-packages/pdf2zh/high_level.py", line 25, in
from pdf2zh.doclayout import OnnxModel
File "/usr/local/lib/python3.12/site-packages/pdf2zh/doclayout.py", line 4, in
import cv2
File "/usr/local/lib/python3.12/site-packages/cv2/init.py", line 181, in
bootstrap()
File "/usr/local/lib/python3.12/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory

测试文档

services:
pdfmathtranslate:
image: byaidu/pdf2zh:v1.9.0
container_name: pdfmathtranslate
restart: unless-stopped
ports:
- 7860:7860
volumes:
- ./data/pdf2zh_files:/app/pdf2zh_files

@JiyongShi JiyongShi added the bug Something isn't working label Jan 24, 2025
@hellofinch
Copy link
Contributor

https://stackoverflow.com/questions/62786028/importerror-libgthread-2-0-so-0-cannot-open-shared-object-file-no-such-file-o
在docker容器里按照网页的说明安装一下libglib2.0-0试一下吧,这个可能是个特例。

@SamDu1998
Copy link

同样报了这个错误,在watchover自动升级到最新版了之后。

@JiyongShi
Copy link
Author

RUN apt-get update &&
apt-get install --no-install-recommends -y libgl1 libglib2.0-0 curl &&
rm -rf /var/lib/apt/lists/* && uv pip install --system --no-cache huggingface-hub &&
增加安装 libglib2.0-0可以,windows和另外一台linux都是这个错误,可能debian系的都会有异常

@SamDu1998
Copy link

感谢(但是我在用的Ubuntu好像无法安装上pip install --system --no-cache huggingface-hub )我这边再研究一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants