此应用程序无法启动,因为无法初始化 Qt 平台插件

此应用程序无法启动,因为无法初始化 Qt 平台插件

我想在我的 ubuntu 20.04 上安装 Systemback,但发现这一页。当我运行 systemback 时,我收到此错误消息。

ckim@ckim-ubuntu:~$ sudo systemback&
[1] 220231
ckim@ckim-ubuntu:~$ No protocol specified
No protocol specified
qt.qpa.xcb: could not connect to display :2
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, xcb.

我应该安装什么以及如何安装?(仅供参考,我在工作时在 Windows 10 机器上的 vnc 客户端上执行此操作,并从家里连接到 Windows 10 机器)提前致谢!

添加:我试了sudo apt install qt5dxcb-plugin又试了一次,还是不行。(说插件“xcb”无法加载,尽管找到了)但是当我在控制台窗口运行它时,systemback 起作用了。我想我以前也在 16.04 上的 vnc 窗口上运行过 systemback。

答案1

最近更新后,我在 ubuntu 20.04 中使用另一个工具 (virtualbox) 时遇到了类似的问题。对我来说,解决方法是在命令行中执行此操作:

xhost +local:

也许它应该位于启动期间始终执行的某个文件中。重新安装 libxcb-xinerama0 和 qt5-default 没用。

答案2

我在使用 QtCreator 时遇到了同样的问题。尝试执行此命令替换 libxcb-xinerama0.so.2

sudo apt-get install --reinstall libxcb-xinerama0

答案3

我在 Windows 10 上尝试从 Ubuntu 运行 elctrum 时遇到了这个问题。运行“>export QT_DEBUG_PLUGINS=1”后,我发现它无法打开显示。我安装了虚拟主机并且成功了。该过程解释如下:如何在 Windows 10 上的 Ubuntu 上的 Bash 上运行图形化 Linux 应用程序 希望这可以帮助!

相关内容