Debian buster qt.qpa.plugin 无法加载 Qt 平台插件“xcb”

如何解决Debian buster qt.qpa.plugin 无法加载 Qt 平台插件“xcb”

您好,我针对这个问题运行了许多参考教程,但没有一个能解决我的问题。 当我安装笔记本电脑模式工具时出现了问题 并尝试启动 GUI。

sudo apt-get install laptop-mode-tools

 pkexec /usr/sbin/lmt-config-gui
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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,wayland-egl,wayland,wayland-xcomposite-egl,wayland-xcomposite-glx,webgl,xcb,dxcb.

Aborted

但这也能让我了解如何解决其他软件的 qt 问题。

我跑了

    sudo apt-get install '^xcb*'
    sudo apt-get install build-dep qt5-default
    sudo python3.7 -m pip install pyqt5 pyqt5-tools pyqt5-plugins
    sudo ln -s /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms /usr/bin/platforms
    error checking 
    ls -la /usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqxcb.so
    -rwxr-xr-x 1 root staff 19744 feb 28 09:56 /usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqxcb.so
    ls -la /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
    lrwxrwxrwx 1 root root 22 set 14 14:15 /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 -> libQt5XcbQpa.so.5.11.3

    in /etc/group add in group staff staff:x:50:myuser

测试ldd

/usr/bin/platforms$ ldd libqxcb.so 
linux-vdso.so.1 (0x00007fffeb737000)
    libQt5XcbQpa.so.5 => /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 (0x00007f3f62e04000)
    libQt5Gui.so.5 => /lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f3f62879000)
    libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f3f6237e000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3f621fa000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3f62039000)
    libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f3f61ff3000)
    libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f3f61f35000)
    libQt5DBus.so.5 => /lib/x86_64-linux-gnu/libQt5DBus.so.5 (0x00007f3f61e9e000)
......
libxcb-util.so.0 => /lib/x86_64-linux-gnu/libxcb-util.so.0 (0x00007f3f5ff42000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f3f61055000)
......
libicudata.so.63 => /lib/x86_64-linux-gnu/libicudata.so.63 (0x00007f3f5e028000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f3f5dfb4000)
    libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f3f5df13000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3f5df09000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f3f5dedf000)
    liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f3f5dec0000)
    libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f3f5dda2000)
    libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f3f5dd7f000)

我尝试运行此命令以了解错误

    export QT_DEBUG_PLUGINS=1
    export QT_QPA_PLATFORM=xcb
    export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/bin/platforms

    /usr/sbin/lmt-config-gui
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libdxcb.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libdxcb.so,metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3","MetaData": {
        "Keys": [
            "dxcb"
        ]
    },"className": "DPlatformIntegrationPlugin","debug": false,"version": 330499
}


Got keys from plugin meta data ("dxcb")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so,"MetaData": {
        "Keys": [
            "eglfs"
        ]
    },"className": "QEglFSIntegrationPlugin","version": 330499
}

....很长的文件,我剪掉了一些部分

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/2csv"
"Failed to extract plugin meta data from '/usr/bin/2csv'" 
         not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/2html"
"Failed to extract plugin meta data from '/usr/bin/2xml'" 
         not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/2to3-2.7"
QElfParser: '/usr/bin/2to3-2.7' is not an ELF object
"'/usr/bin/2to3-2.7' is not an ELF object" 
         not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/2xml"
"Failed to extract plugin meta data from '/usr/bin/2xml'" 
         not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/411toppm"
"Failed to extract plugin meta data from '/usr/bin/411toppm'" 
         not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/7z"
QElfParser: '/usr/bin/7z' is not an ELF object (file too small)
"'/usr/bin/7z' is not an ELF object (file too small)" 

....很长的文件,我剪掉了一些部分

QFactoryLoader::QFactoryLoader() looking at "/usr/bin/zmore"
QElfParser: '/usr/bin/zmore' is not an ELF object
"'/usr/bin/zmore' is not an ELF object" 
         not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/znew"
QElfParser: '/usr/bin/znew' is not an ELF object
"'/usr/bin/znew' is not an ELF object" 
         not a plugin
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqeglfs.so"
Found metadata in lib /usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqeglfs.so,"archreq": 0,"version": 331520
}


Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqlinuxfb.so,"MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },"className": "QLinuxFbIntegrationPlugin","version": 331520
}


Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqminimal.so"
Found metadata in lib /usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqminimal.so,"MetaData": {
        "Keys": [
            "minimal"
        ]
    },"className": "QMinimalIntegrationPlugin","version": 331520
}


....很长的文件,我剪掉了一些部分

Got keys from plugin meta data ("webgl")
QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqxcb.so,"MetaData": {
        "Keys": [
            "xcb"
        ]
    },"className": "QXcbIntegrationPlugin","version": 331520
}


Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libdxcb.so"
Got keys from plugin meta data ("dxcb")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqeglfs.so"
Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqlinuxfb.so"
Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqminimal.so"
Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqminimalegl.so"
Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqoffscreen.so"
Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqvnc.so"
Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqwayland-egl.so"
Got keys from plugin meta data ("wayland-egl")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqwayland-generic.so"
Got keys from plugin meta data ("wayland")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqwayland-xcomposite-egl.so"
Got keys from plugin meta data ("wayland-xcomposite-egl")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqwayland-xcomposite-glx.so"
Got keys from plugin meta data ("wayland-xcomposite-glx")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqxcb.so"
Got keys from plugin meta data ("xcb")
Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
QLibraryPrivate::loadPlugin failed on "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
Cannot load library /usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (libxcb-util.so.1: impossibile aprire il file oggetto condiviso: File o directory non esistente)
QLibraryPrivate::loadPlugin failed on "/usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /usr/local/lib/python3.7/dist-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (libxcb-util.so.1: impossibile aprire il file oggetto condiviso: File o directory non esistente)"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/bin/platforms" 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: dxcb (from /usr/bin/platforms),eglfs (from /usr/bin/platforms),linuxfb (from /usr/bin/platforms),minimal (from /usr/bin/platforms),minimalegl (from /usr/bin/platforms),offscreen (from /usr/bin/platforms),vnc (from /usr/bin/platforms),wayland-egl (from /usr/bin/platforms),wayland (from /usr/bin/platforms),wayland-xcomposite-egl (from /usr/bin/platforms),wayland-xcomposite-glx (from /usr/bin/platforms),xcb (from /usr/bin/platforms),eglfs,dxcb.

Aborted

解决方法

尝试以下解决方案(在控制台中输入):

sudo xhost +si:localuser:$USER

在大多数情况下,它应该会有所帮助,并且您应该能够运行该应用程序

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams['font.sans-serif'] = ['SimHei'] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -> systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping("/hires") public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate<String
使用vite构建项目报错 C:\Users\ychen\work>npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-
参考1 参考2 解决方案 # 点击安装源 协议选择 http:// 路径填写 mirrors.aliyun.com/centos/8.3.2011/BaseOS/x86_64/os URL类型 软件库URL 其他路径 # 版本 7 mirrors.aliyun.com/centos/7/os/x86
报错1 [root@slave1 data_mocker]# kafka-console-consumer.sh --bootstrap-server slave1:9092 --topic topic_db [2023-12-19 18:31:12,770] WARN [Consumer clie
错误1 # 重写数据 hive (edu)> insert overwrite table dwd_trade_cart_add_inc > select data.id, > data.user_id, > data.course_id, > date_format(
错误1 hive (edu)> insert into huanhuan values(1,'haoge'); Query ID = root_20240110071417_fe1517ad-3607-41f4-bdcf-d00b98ac443e Total jobs = 1
报错1:执行到如下就不执行了,没有显示Successfully registered new MBean. [root@slave1 bin]# /usr/local/software/flume-1.9.0/bin/flume-ng agent -n a1 -c /usr/local/softwa
虚拟及没有启动任何服务器查看jps会显示jps,如果没有显示任何东西 [root@slave2 ~]# jps 9647 Jps 解决方案 # 进入/tmp查看 [root@slave1 dfs]# cd /tmp [root@slave1 tmp]# ll 总用量 48 drwxr-xr-x. 2
报错1 hive> show databases; OK Failed with exception java.io.IOException:java.lang.RuntimeException: Error in configuring object Time taken: 0.474 se
报错1 [root@localhost ~]# vim -bash: vim: 未找到命令 安装vim yum -y install vim* # 查看是否安装成功 [root@hadoop01 hadoop]# rpm -qa |grep vim vim-X11-7.4.629-8.el7_9.x
修改hadoop配置 vi /usr/local/software/hadoop-2.9.2/etc/hadoop/yarn-site.xml # 添加如下 <configuration> <property> <name>yarn.nodemanager.res