[email protected] PC:/opt/apps/xltest/files$ ./xltray This application failed to start because it could not find or load the Qt platform plugin 'xcb' in ''....">

当前位置:网站首页>qt程序插件报错plugin xcb

qt程序插件报错plugin xcb

2022-06-10 23:33:00 雨田嘟嘟

[email protected]:/opt/apps/xltest/files$ ./xltray
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: dde-kwin-xcb, dxcb, eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem.


启动qt界面程序报错。这是什么原因呢,按照提示重新安装程序可以解决问题?当然不会的,这个是系统环境问题。

ldd 查看 xltray并不缺少依赖库,其实不用ldd也知道不缺少依赖库,因为缺少依赖库的话会报找不到对应的共享库文件。elf缺少依赖库的报错如下:

error while loading shared libraries: libxltest.so.1: cannot open shared object file: No such file or directory

    我们从提示上看出是“load the Qt platform plugin "xcb” 出的问题,那么意味着是Qt平台插件相关的错误。

    Qt平台下的编程中包含了插件模式,使得程序的扩展性非常好,但是插件的动态加载的检查也比较严格,出现错误的可能性也大大增加,无法加载的原因有多种:

  1.     找不到文件,编译的插件共享库库没有放在正确的rpath目录下;
  2.     插件库运行还依赖其他库,如果系统没有
原网站

版权声明
本文为[雨田嘟嘟]所创,转载请带上原文链接,感谢
https://blog.csdn.net/xuleisdjn/article/details/125000190