如何让 Qt Creator 在新系统上运行?

如何让 Qt Creator 在新系统上运行?

我尝试在新的 Debian 上安装 Qt 开发环境,但没有成功。首先,自动在线安装程序甚至无法让我进入可用状态,因为 xserver 崩溃了。我必须手动添加buster-backports到我的sources.list(这可能稍后会变得相关)

之后的第一件事是从 Qt 网站下载并启动网络安装程序。 (qt-unified-linux-x64-4.0.1-1-online.run)

Qt Designer、Translator 和其他应用程序正常启动,但 qtcreator 无法正常启动。

从控制台启动它时,出现以下错误:

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.

Aborted

使用详细选项(导出 QT_DEBUG_PLUGINS=1)我得到

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/opt/Qt/Tools/QtCreator/bin/platforms" ...
Cannot load library /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory)"

搜索这个错误,每个人都建议安装libxcb-xinerama0,几乎每个人都回复了感谢,因为它有效。所以我安装了它。一切都没有改变。

另一个建议是“sudo cp ~/.Xauthority /root”

它也没有改变任何东西。

如果我从“软件中心”GUI 安装 Qt Creator,我会得到旧版本的 qtcreator,它可以运行,但无法识别我安装的任何组件,因此它只是一个文本编辑器。

qtdiag使用 I get检查 qt 版本

Qt 5.11.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.3.0) on "xcb" 
OS: Debian GNU/Linux 10 (buster) [linux version 5.10.0-0.bpo.3-amd64]

这很奇怪,因为我安装了 Qt 5.15。另外,我看到许多 GUI 东西至少需要 Qt 5.12 的报告,所以使用 5.11 可能是一个问题。我想我有 Qt 5.11.3(甚至在安装 Qt 之前),因为我运行 KDE,而 KDE 使用 Qt。

所以现在怎么办?仅通过删除所有以“qt”开头的软件包来卸载 Qt 几乎肯定会破坏我的系统。

答案1

众多之一论坛qt 确实提供了答案:

sudo ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

Qt 创建者现在启动。在安装之前,我仍然无法构建任何 GUI 程序,甚至无法构建“hello world”程序libgl1-mesa-dev(我怎么能猜到它的名字?错误是一个通用的“找不到 IGL”)

相关内容