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

ImportError: libGL.so.1: cannot open shared object file: No such file or directory #3435

Closed
3 tasks done
weidazhaoooo opened this issue Aug 4, 2023 · 3 comments
Closed
3 tasks done
Assignees
Labels
bug Something isn't working

Comments

@weidazhaoooo
Copy link

问题确认 Search before asking

Bug描述 Describe the Bug

在运行如下代码时:
!export CUDA_VISIBLE_DEVICES=0 # 设置1张可用的卡
!python PaddleSeg/tools/train.py
--config PaddleSeg/configs/ocrnet/ocrnet_hrnetw48_cityscapes_1024x512_160k.yml
--do_eval
--use_vdl
--save_interval 100
--save_dir PaddleSeg/output
报错如下:
Traceback (most recent call last):
File "PaddleSeg/tools/train.py", line 20, in
import cv2
File "/opt/conda/lib/python3.8/site-packages/cv2/init.py", line 8, in
from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
安装过程中没有问题,重装了好几遍,在运行训练时候出现如下报错,求解答~
系统为:linux version 3.10.0-1160.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Mon Oct 19 16:18:59 UTC 2020;paddle版本2.5;cuda版本11.4

复现环境 Environment

paddle版本2.5;cuda版本11.4;cuDNN 8.2

Bug描述确认 Bug description confirmation

  • 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • 我愿意提交PR!I'd like to help by submitting a PR!
@weidazhaoooo weidazhaoooo added the bug Something isn't working label Aug 4, 2023
@Asthestarsfalll
Copy link
Contributor

试试这个
apt install libgl1-mesa-glx

@weidazhaoooo
Copy link
Author

已解决谢谢!!!

@ToddBear
Copy link
Collaborator

ToddBear commented Aug 7, 2023

以上回答已经充分解答了问题,如果有新的问题欢迎随时提交issue,或者在此条issue下继续回复~
我们开启了飞桨套件的ISSUE攻关活动,欢迎感兴趣的开发者参加:PaddlePaddle/PaddleOCR#10223

@ToddBear ToddBear closed this as completed Aug 7, 2023
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