【解决方法】libGL.so.1: cannot open shared object file: No such file or directory
在配云端GPU服务器时,出现这个错误
File "/usr/local/lib/python3.6/dist-packages/cv2/__init__.py", line 8, in <module>
from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
解决方法
安装这个库即可
pip install opencv-python-headless
亲测有效
在Stack Overflow上有其他回答,当我试了无效
这边也提供给大家
1、在docker中出错
将以下行添加到您的 Dockerfile:
RUN apt-get update
RUN apt-get install ffmpeg libsm6 libxext6 -y
这些命令安装通常存在于本地计算机上的 cv2 依赖项,但可能会在您的 Docker 容器中丢失,从而导致问题。
2、libGL.so.1由 package 提供libgl1,所以添加一下代码
apt-get update && apt-get install libgl1
3、如果您使用的是 CentOS、RHEL、Fedora 或其他使用 的 linux 发行版yum,您将需要:
sudo yum install mesa-libGL -y
这些都是高赞回答,对于大家应该有效。
对于我来说,安装opencv-python-headless是有效的。
【解决方法】libGL.so.1: cannot open shared object file: No such file or directory的更多相关文章
- 解决ImportError: libmysqlclient_r.so.16: cannot open shared object file-乾颐堂
在开发一个python项目是,需要用到mysql,但是, 安装完mysql-python后import加载模块提示以下错误: ImportError: libmysqlclient_r.so.16: ...
- rapidxml读取包含中文路径的xml解析错误的解决方法
from http://blog.csdn.net/qinwei4072880/article/details/38865179 1.rapidxml不支持中文路径. 2.rapidxml不支持Uni ...
- Spring编译后没有xml配置文件解决方法
问题描述 在使用Maven来构建Spring项目的时候,使用下面代码来读取Spring配置文件. ClassPathXmlApplicationContext context = new ClassP ...
- 在docker中导入python的包时ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory
问题: ImportError: libGL.so.1: cannot open shared object file: No such file or directory ImportError: ...
- 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!&&在eclipse.ini中为eclipse指定jdk启动
参考:http://blog.csdn.net/zyz511919766/article/details/7442633 http://blog.sina.com.cn/s/blog_028f0c1c ...
- 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!
启动 Eclipse 弹出"Failed to load the JNI shared library jvm.dll"错误的解决方法 http://blog.csdn.net/z ...
- 〖Android〗arm-linux-androideabi-gdb报 libpython2.6.so.1.0: cannot open shared object file错误的解决方法
执行: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gdb out/target/p ...
- ORA-27125: unable to create shared memory segment的解决方法(转)
ORA-27125: unable to create shared memory segment的解决方法(转) # Kernel sysctl configuration file for Red ...
- 视图不能由多个 ListView 共享 (View can't be shared by more than one ListView) 的一个解决方法
1.问题的起因 在WPF中遇到一异常,如题. 因此做一个Demo代码来复现问题,代码如下: <Window x:Class="WpfAppThread.MainWindow" ...
- 安装tensorflow报ImportError: libcublas.so.9.0: cannot open shared object file的解决方法【转】
本文转载自:https://blog.csdn.net/qq_37274615/article/details/81099738 转载自:https://blog.csdn.net/qysh123/a ...
随机推荐
- SpringBoot动态数据源配置
SpringBoot动态数据源配置 序:数据源动态切换流程图如下: 1:pom.xml文件依赖声明 <dependency> <groupId>org.springfram ...
- 个人团队兼职开发app(社交,语聊1v1,视频直播)
如果您有意向创业,意向社交类产品,如语聊,及时通信,视频直播,1v1等,又苦无没有人力资源. 我们岁数都是30+,在互联网行业摸爬滚打十年有余. 后端,前端,客户端,运维,四个人. 我们共事很长一段时 ...
- 移植 uCos-III 3.03 到 STM32F429 上
背景 通过STM32 的学习,我们可以往更深层次的地方走,尝试系统上的一些开发. STM32: F429(StdPeriph) uCos-III : v3.04 + 3.03 有关说明: 在移植 3. ...
- Springboot中自定义监听器
一.监听器模式图 二.监听器三要素 广播器:用来发布事件 事件:需要被传播的消息 监听器:一个对象对一个事件的发生做出反应,这个对象就是事件监听器 三.监听器的实现方式 1.实现自定义事件 自定义事件 ...
- aiohttp 子线程启动/中止服务
import time, threading from aiohttp import web import asyncio async def handler(request): return web ...
- 面试官:Java类是如何被加载到内存中的?
面试连环call Java类是如何被加载到内存中的? Java类的生命周期都有哪些阶段? JVM加载的class文件都有哪些来源? JVM在加载class文件时,何时判断class文件的格式是否符合要 ...
- 【Mysql】 MysqlDump导表结构或数据
mysqldump只导出表结构或只导出数据的实现方法 语法: 默认不带参数的导出,导出文本内容大概如下:创建数据库判断语句-删除表-创建表-锁表-禁用索引-插入数据-启用索引-解锁表. Usage: ...
- 《Programming from the Ground Up》阅读笔记:p19-p48
<Programming from the Ground Up>学习第2天,p19-p48总结,总计30页. 一.技术总结 1.object file p20, An object fil ...
- 可视化学习:如何用WebGL绘制3D物体
在之前的文章中,我们使用WebGL绘制了很多二维的图形和图像,在学习2D绘图的时候,我们提过很多次关于GPU的高效渲染,但是2D图形的绘制只展示了WebGL部分的能力,WebGL更强大的地方在于,它可 ...
- PAT-1003 我要通过! (20分) JavaScript(node)
"答案正确"是自动判题系统给出的最令人欢喜的回复.本题属于 PAT 的"答案正确"大派送 -- 只要读入的字符串满足下列条件,系统就输出"答案正确&q ...