Open3d报错X Error of failed request: GLXBadFBConfig


X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 151 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 33
Current serial number in output stream: 31

1 报错

(isdf) meng@meng:~/subject/iSDF/iSDF/isdf/train$ python train_vis.py --config configs/replicaCAD.json
INFO - 2022-10-30 12:18:57,334 - topics - topicmanager initialized
Did not import ROS node.
/home/meng/anaconda3/envs/isdf/lib/python3.8/site-packages/PIL/Image.py:3011: DecompressionBombWarning: Image size (134217728 pixels) exceeds limit of 89478485 pixels, could be decompression bomb DOS attack.
  warnings.warn(
Icosahedron embedding with periods: [105.82226438  52.91113219  26.4555661   13.22778305   6.61389152
   3.30694576]  -- embedding size: 255
FEngine (64 bits) created at 0x561dbb506af0 (threading is enabled)
FEngine resolved backend: OpenGL
X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  34 ()
  Serial number of failed request:  33
  Current serial number in output stream:  31

在这里插入图片描述

2 解决

解决思路参考了:https://github.com/isl-org/Open3D/issues/2836
我调用python脚本的时候使用到了open3d,而open3d和我目前安装的OpenGL版本不匹配,需要升级OpenGL的版本

2.1 查看当前安装的OpenGL

终端输入glxinfo命令查看OpenGL相关信息输出:
(没有安装的话按提示安装:sudo apt install mesa-utils
部分输出如下,可以看出OpenGL核心文件的版本为3.3,OpenGL的版本为3.1。

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
-------------省略
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
-------------省略
GLX version: 1.4
-------------省略
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: VMware, Inc. (0xffffffff)
    Device: llvmpipe (LLVM 10.0.0, 256 bits) (0xffffffff)
    Version: 20.0.8
    Accelerated: no
    Video memory: 15725MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 10.0.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 20.0.8
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
-------------省略
OpenGL version string: 3.1 Mesa 20.0.8
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
-------------省略
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 20.0.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
-------------省略

也可以输入glxinfo -B,查看的信息相对简洁

在这里插入图片描述

查看python环境中opengl版本(这个应该不影响,不需要怎么关注)
conda list | grep "opengl",我这里为3.1.0

在这里插入图片描述

2.2 升级OpenGL

升级OpenGL到默认的最新版本(注意校园网不行的话,可以换手机流量,也可以试试开关vpn,我这里用手机流量才行):

sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt update && sudo apt upgrade

第一条命令会添加源,部分源如下所示:

获取:29 http://ppa.launchpad.net/kisak/kisak-mesa/ubuntu bionic InRelease [21.3 kB]     

获取:36 http://ppa.launchpad.net/kisak/kisak-mesa/ubuntu bionic/main i386 Packages [20.8 kB]    

获取:40 http://ppa.launchpad.net/kisak/kisak-mesa/ubuntu bionic/main amd64 Packages [21.3 kB]    

获取:43 http://ppa.launchpad.net/kisak/kisak-mesa/ubuntu bionic/main Translation-en [11.8 kB]     

在这里插入图片描述

第二条命令会更新源,更新之前电脑上的包,和从新添加的源里面获取包;这里会额外更新ubuntu内核,如果觉得内核多事的话,可以查看其他教程单独进行安装/升级;我这里直接输入y进行安装了
(注:ubuntu单独安装opengl参考:1,2

在这里插入图片描述

我这里在更新的过程中出现解包报错,如下所示,即libgl-dev:amd64libgl-dev:i386这两个包没有正常解包:

正在选中未选择的软件包 libgl-dev:amd64。
正准备解包 .../028-libgl-dev_1.3.3-1~kisak1~b_amd64.deb  ...
正在解包 libgl-dev:amd64 (1.3.3-1~kisak1~b) ...
dpkg: 处理归档 /tmp/apt-dpkg-install-baEe74/028-libgl-dev_1.3.3-1~kisak1~b_amd64.deb (--unpack)时出错:
 正试图覆盖 /usr/include/GL/gl.h,它同时被包含于软件包 mesa-common-dev:i386 20.0.8-0ubuntu1~18.04.1
dpkg-deb: 错误: 粘贴 subprocess was killed by signal (断开的管道)

正在选中未选择的软件包 libgl-dev:i386。
正准备解包 .../034-libgl-dev_1.3.3-1~kisak1~b_i386.deb  ...
正在解包 libgl-dev:i386 (1.3.3-1~kisak1~b) ...
dpkg: 处理归档 /tmp/apt-dpkg-install-baEe74/034-libgl-dev_1.3.3-1~kisak1~b_i386.deb (--unpack)时出错:
 正试图覆盖 /usr/include/GL/gl.h,它同时被包含于软件包 mesa-common-dev:i386 20.0.8-0ubuntu1~18.04.1
由于已经达到 MaxReports 限制,没有写入 apport 报告。
dpkg-deb: 错误: 粘贴 subprocess was killed by signal (断开的管道)

在这里插入图片描述

使用sudo apt --fix-broken install修正软件包的安装。
然后再执行sudo apt update && sudo apt upgrade就没有报错了

2.2 查看升级OpenGL是否成功

输入:输入glxinfo -B,查看OpenGL是否更新到最新版本

在这里插入图片描述

我这里升级成功了,并且没报错了

  • 5
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值