问题集合

  • Qt plugin报错 “Could not load the Qt platform plugin “xcb” /cv2/qt/plugins” even though it was found."

    原因: N/A

    解决办法: 使用opencv-python-headless代替opencv-python

    pip uninstall opencv-python
    pip install opencv-python-headless
    

    参考文档: github/sam2act/SAM2Act (README.md)

  • 报错 “Could not find or correctly load the video compression library.”

    原因: 系统版本过高(Ubuntu>20.04),CoppeliaSim内置的ffmpeg库失效

    解决办法: 重新编译一份libvvcl.so,复制到CoppeliaSim目录中,如果安装了RLBench包,记得重新安装一次哦

    git clone https://github.com/CoppeliaRobotics/videoRecorder.git
    cd videoRecorder/vvcl
    mkdir build
    cd build
    cmake ..
    make
    cp libvvcl.so $COPPELIASIM_ROOT
    

    参考文档: https://github.com/stepjam/PyRep/issues/142#issuecomment-606953104

  • 报错 “This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.”

    报错:

    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "~/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
    

    原因: 运行在GUI模式,但是没有桌面环境

    解决办法:

    • 法1: 使用 headless 模式
    • 法2: 在有显示器的桌面环境下运行,或确保DISPLAY变量指向正在运行的桌面
    • 法3: 使用 eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb等工具,在虚拟桌面下运行

    参考文档: https://github.com/huangwl18/VoxPoser/issues/1#issuecomment-2664404719

  • 报错 “Error: signal 11: /lib/x86_64-linux-gnu/libc.so.6或/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so” 等

    原因: conda等虚拟环境默认使用自带的gcc/g++库,它们版本过低,而系统中的swrast_dri.so等需要高版本gcc/g++库的高版本ABI支持。

    解决办法:

    • 法1: 手动将系统中的库加入LD_PRELOAD
      export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
      export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libc.so.6
      
    • 法2: conda安装高版本gcc/g++
      conda install conda-forge::libstdcxx-ng
      # if installing libstdcxx-ng not work
      # conda install gcc
      

    参考文档: https://github.com/huangwl18/VoxPoser/issues/1#issuecomment-2664404719