ubuntu新安装gnome-desktop后运行pyside6/pyqt5程序报错

bash 复制代码
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: offscreen, vkkhrdisplay, eglfs, wayland, linuxfb, vnc, minimalegl, xcb, wayland-egl, minimal.

解决方案:

bash 复制代码
~$ export QT_DEBUG_PLUGINS=1
~$ sudo apt-get install libxcb* libxkbcommon*
相关推荐
HAPPY酷4 分钟前
C++ 和 Python 的“容器”对决:从万金油到核武器
开发语言·c++·python
松涛和鸣14 分钟前
72、IMX6ULL驱动实战:设备树(DTS/DTB)+ GPIO子系统+Platform总线
linux·服务器·arm开发·数据库·单片机
Anesthesia丶24 分钟前
Ubuntu20.04 升级 Ubuntu24.04 LTS
ubuntu
简单中的复杂40 分钟前
【避坑指南】RK3576 Linux SDK 编译:解决 Buildroot 卡死在 host-gcc-final 的终极方案
linux·嵌入式硬件
gpfyyds6661 小时前
Python代码练习
开发语言·python
wVelpro1 小时前
如何在Pycharm 2025.3 版本实现虚拟环境“Make available to all projects”
linux·ide·pycharm
程序员老舅2 小时前
C++高并发精髓:无锁队列深度解析
linux·c++·内存管理·c/c++·原子操作·无锁队列
雨中风华2 小时前
Linux, macOS系统实现远程目录访问(等同于windows平台xFsRedir软件的目录重定向)
linux·windows·macos
aiguangyuan2 小时前
使用LSTM进行情感分类:原理与实现剖析
人工智能·python·nlp
小小张说故事2 小时前
BeautifulSoup:Python网页解析的优雅利器
后端·爬虫·python