【Qt】Qt发布程序时,报错: could not find or load the Qt platform plugin "xcb"

问题描述

Qt程序在发布时,报错:
This application failed to start because it could not find or load the Qt platform plugin “xcb”
in “”.
Reinstalling the application may fix this problem
Aborted (core dumped)

原因

没有将libqxcb库拷贝到发布包中,或者libqxcb需要的动态库不全

解决办法

将Qt安装目录中 Qt5.6.3/5.6.3/gcc_64/plugins/platforms 拷贝到qt程序所在目录,
使用ldd查看libqxcb需要链接的库是否能找到,如果没有,将缺少的库一并拷贝到发布包中

你可能感兴趣的:(Qt)