[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