龙空技术网

ubuntu 22 安装Qt 各类报错解决

alantop 153

前言:

目前兄弟们对“ubuntu安装vim失败”大概比较关切,看官们都想要知道一些“ubuntu安装vim失败”的相关文章。那么小编在网摘上收集了一些关于“ubuntu安装vim失败””的相关文章,希望小伙伴们能喜欢,小伙伴们一起来学习一下吧!

下载安装

下载在线安装器。

.\qt-unified-windows-x86-online.exe --mirror 

安装后,一般无法运行。

用命令行启动,命令行下会提示,缺少哪些对应的库。缺什么库,安装什么库即可。

常见错误如下:

例一错误:

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: wayland-egl, minimalegl, vkkhrdisplay, xcb, wayland, offscreen, eglfs, vnc, minimal, linuxfb.已放弃 (核心已转储)

apt install libxkbcommon-x11-0vim ~/.bashrc文件结尾加入:export QT_DEBUG_PLUGINS=1source ~/.bashrc

例二错误:

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("linuxfb")qt.core.plugin.factoryloader: checking directory path "/opt/Qt/Tools/QtCreator/bin/platforms" ...qt.core.library: "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so" cannot load: Cannot load library /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so: (libxcb-cursor.so.0: 无法打开共享对象文件: 没有那个文件或目录)qt.core.plugin.loader: 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-cursor.so.0: 无法打开共享对象文件: 没有那个文件或目录)"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: wayland-egl, minimalegl, vkkhrdisplay, xcb, wayland, offscreen, eglfs, vnc, minimal, linuxfb.

上门是提示缺少动态库,查询动态库,安装缺失的动态库

ldd /home/brainiac/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.soldd /home/brainiac/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so | grep "not found"

apt-get install libxcb*apt-get install libxkbcommon*apt-get install libxcb-cursor* 

正确配置启动如下图:

标签: #ubuntu安装vim失败