This application failed to start because it could not find or load the Qt platform plugin "xcb".

时间:2023-03-09 01:26:14
This application failed to start because it could not find or load the Qt platform plugin "xcb".

1.  copy      libQt5DBus.so.5

2.  add    QT_PLUGIN_PATH

blog.csdn.net/windows_nt/article/details/24205671

his application failed to start because it could not find or load the Qt platform plugin "xcb".

分类: Qt linux 2014-04-21 00:02 7793人阅读 评论(5) 收藏 举报

linux系统下Qt5编译好的程序在未安装Qt的系统下运行会报以下错误:

This application failed to start because it could not find or load the Qt platform plugin "xcb".

Reinstalling the application may fix this problem.

出现这个错误,主要是因为qt5为了在多平台下更方便移植,使用了一种新的技术-----platform abstraction system (QPA),而它中的库又依赖于Qt5中的一个库文件libQt5DBus.so.5,所以,只要打包时只要加上这个文件就可以了。

linux下qt5程序打包步骤如下

1、把以下7个库文件放到/usr/lib目录下

libQt5Widgets.so.5
    libQt5Gui.so.5
    libQt5Core.so.5
    libicui18n.so.51
    libicuuc.so.51
    libicudata.so.51

libQt5DBus.so.5

2、拷贝Qt5安装目录中的platforms目录,使它和你的Qt程序同级目录

现在你可以双击你的程序运行了呵呵

bbs.csdn.net/topics/390633699