Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1059|回复: 0
打印 上一主题 下一主题

统信uos家庭版22.0安装qt5.15.2问题

[复制链接]

1265

主题

2054

帖子

7897

积分

认证用户组

Rank: 5Rank: 5

积分
7897
跳转到指定楼层
楼主
发表于 2023-4-13 14:07:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 Qter 于 2023-4-13 14:29 编辑

安装完成后,运行自带的demo报如下错误:
  1. 14:10:12: Debugging /home/admin/Qt5.15.2/Examples/Qt-5.15.2/widgets/itemviews/build-addressbook-Desktop_Qt_5_15_2_GCC_64bit-Debug/addressbook ...
  2. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
  3. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

  4. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
复制代码
在~/.bashrc中添加QT_DEBUG_PLUGINS在编译过程中可列出详细错误,亦可直接export:
  1. export QT_DEBUG_PLUGINS=1
复制代码
  1. admin@admin:~/Qt5.15.2/Examples/Qt-5.15.2/widgets/itemviews/build-addressbook-Desktop_Qt_5_15_2_GCC_64bit-Debug$ ./addressbook
  2. Found metadata in lib /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqeglfs.so, metadata=
  3. {
  4.     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
  5.     "MetaData": {
  6.         "Keys": [
  7.             "eglfs"
  8.         ]
  9.     },
  10.     "archreq": 0,
  11.     "className": "QEglFSIntegrationPlugin",
  12.     "debug": false,
  13.     "version": 331520
  14. }


  15. Found metadata in lib /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so, metadata=
  16. {
  17.     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
  18.     "MetaData": {
  19.         "Keys": [
  20.             "linuxfb"
  21.         ]
  22.     },
  23.     "archreq": 0,
  24.     "className": "QLinuxFbIntegrationPlugin",
  25.     "debug": false,
  26.     "version": 331520
  27. }


  28. Found metadata in lib /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqminimal.so, metadata=
  29. {
  30.     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
  31.     "MetaData": {
  32.         "Keys": [
  33.             "minimal"
  34.         ]
  35.     },
  36.     "archreq": 0,
  37.     "className": "QMinimalIntegrationPlugin",
  38.     "debug": false,
  39.     "version": 331520
  40. }


  41. Found metadata in lib /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so, metadata=
  42. {
  43.     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
  44.     "MetaData": {
  45.         "Keys": [
  46.             "minimalegl"
  47.         ]
  48.     },
  49.     "archreq": 0,
  50.     "className": "QMinimalEglIntegrationPlugin",
  51.     "debug": false,
  52.     "version": 331520
  53. }


  54. Found metadata in lib /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so, metadata=
  55. {
  56.     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
  57.     "MetaData": {
  58.         "Keys": [
  59.             "offscreen"
  60.         ]
  61.     },
  62.     "archreq": 0,
  63.     "className": "QOffscreenIntegrationPlugin",
  64.     "debug": false,
  65.     "version": 331520
  66. }


  67. Found metadata in lib /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqvnc.so, metadata=
  68. {
  69.     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
  70.     "MetaData": {
  71.         "Keys": [
  72.             "vnc"
  73.         ]
  74.     },
  75.     "archreq": 0,
  76.     "className": "QVncIntegrationPlugin",
  77.     "debug": false,
  78.     "version": 331520
  79. }


  80. Found metadata in lib /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqwayland-egl.so, metadata=
  81. {
  82.     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
  83.     "MetaData": {
  84.         "Keys": [
  85.             "wayland-egl"
  86.         ]
  87.     },
  88.     "archreq": 0,
  89.     "className": "QWaylandEglPlatformIntegrationPlugin",
  90.     "debug": false,
  91.     "version": 331520
  92. }


  93. Found metadata in lib /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so, metadata=
  94. {
  95.     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
  96.     "MetaData": {
  97.         "Keys": [
  98.             "wayland"
  99.         ]
  100.     },
  101.     "archreq": 0,
  102.     "className": "QWaylandIntegrationPlugin",
  103.     "debug": false,
  104.     "version": 331520
  105. }


  106. Found metadata in lib /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
  107. {
  108.     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
  109.     "MetaData": {
  110.         "Keys": [
  111.             "wayland-xcomposite-egl"
  112.         ]
  113.     },
  114.     "archreq": 0,
  115.     "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
  116.     "debug": false,
  117.     "version": 331520
  118. }


  119. Found metadata in lib /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
  120. {
  121.     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
  122.     "MetaData": {
  123.         "Keys": [
  124.             "wayland-xcomposite-glx"
  125.         ]
  126.     },
  127.     "archreq": 0,
  128.     "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
  129.     "debug": false,
  130.     "version": 331520
  131. }


  132. Found metadata in lib /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqwebgl.so, metadata=
  133. {
  134.     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
  135.     "MetaData": {
  136.         "Keys": [
  137.             "webgl"
  138.         ]
  139.     },
  140.     "archreq": 0,
  141.     "className": "QWebGLIntegrationPlugin",
  142.     "debug": false,
  143.     "version": 331520
  144. }


  145. Found metadata in lib /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqxcb.so, metadata=
  146. {
  147.     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
  148.     "MetaData": {
  149.         "Keys": [
  150.             "xcb"
  151.         ]
  152.     },
  153.     "archreq": 0,
  154.     "className": "QXcbIntegrationPlugin",
  155.     "debug": false,
  156.     "version": 331520
  157. }


  158. QLibraryPrivate::loadPlugin failed on "/home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqxcb.so" : "Cannot load library /home/admin/Qt5.15.2/5.15.2/gcc_64/plugins/platforms/libqxcb.so: (libxcb-util.so.1: 无法打开共享对象文件: 没有那个文件或目录)"
  159. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
  160. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

  161. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
复制代码
处,主要是动态链接库的问题,在加载libqxcb.so库的时候,还需要加载libxcb-xinerama库。那么不存在libxcb-xinerama.so.0库,就安装这个库。

sudo apt-get install libxcb-xinerama0
1
如果安装完libxcb-xinerama.so.0仍不能解决问题,可能是因为图形库开发人员的系统环境不一样,只依赖了libxcb-util.so.1,然而在Debian系统中对应libxcb-util.so.1的库名称为libxcb-util.so.0,因而可将进行符号链接,将libxcb-util.so.1软链接到libxcb-util.so.0。

cd /usr/lib/x86_64-linux-gnu/
sudo ln -s libxcb-util.so.0  libxcb-util.so.1
1
2
亦可:

sudo ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so.0  /usr/lib/x86_64-linux-gnu/libxcb-util.so.1
1
在创建后即可解决问题,后续可将QT_DEBUG_PLUGINS关掉或删掉。
————————————————
版权声明:本文为CSDN博主「chase。」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_39284111/article/details/119480436

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-11-1 07:58 , Processed in 0.056397 second(s), 19 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表