关于Ubuntu端,qt安装完成,启动报以下错误:
报错:
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: minimalegl, vkkhrdisplay, linuxfb, eglfs, vnc, offscreen, xcb, wayland-egl, minimal, wayland.
如果是以上错误,执行以下命令
sudo apt update
sudo apt-get install libxcb-cursor0
这个命令的作用是安装名为libxcb-cursor0的软件包。这个软件包通常是与XCB(X protocol C-language Binding)库相关的。
然后重新启动qt,看是否正常打开。
如果还没解决:
执行命令:
export QT_DEBUG_PLUGINS=1
这个环境变量用于调试Qt插件加载过程中的问题。将其设置为1
会让Qt在加载插件时输出更多调试信息,有助于诊断插件加载失败或出现其他问题的情况。
重新启动qt,查看报错信息。
之后的步骤可以看这位博主的文章
希望你早日解决这个问题