[linux] ubuntu 下安装qtcreate遇到“无法加载Qt平台插件‘xcb’问题”解决方案
hfl~ 2024-06-13 14:37:02 阅读 95
[linux] ubuntu 下安装qtcreate遇到“无法加载Qt平台插件‘xcb’问题”解决方案
以下是遇到的三种报错情况
From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform 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: wayland-egl, xcb, linuxfb, vnc, minimalegl, vkkhrdisplay, offscreen, eglfs, minimal, wayland.
解决方案
终端命令行输入命令先更新,确保自己已经安装下面内容
sudo apt-get updatesudo apt-get install gcc #安装gcc编译器sudo apt-get install g++ #安装g++编译器sudo apt-get install make #安装make构建套件sudo apt-get install libgl1-mesa-dev #安装OpenGL核心库
需要安装xcb-cursor0 库(最重要的!)
sudo apt-get install libxcb-cursor0
重新启动qt
qtcreator
声明
本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。