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

Source: Internet
Author: User
Linux QT5 program Packaging

QT5 compiled program under Linux system will report the following error when running without QT installation:

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

Reinstalling the application may fix this problem.

This error occurred mainly because QT5 was using a new technology-----Platform Abstraction System (QPA) in order to be more portable under multiple platforms, The library in it also relies on a library file libqt5dbus.so.5 in Qt5, so just add this file when you package it.

Linux Next QT5 program packaging steps are as follows

1. Put the following 7 library files into the/usr/lib directory

Libqt5widgets.so.5
Libqt5gui.so.5
Libqt5core.so.5
libicui18n.so.51
libicuuc.so.51
libicudata.so.51

Libqt5dbus.so.5

2. Copy the platforms directory in the QT5 installation directory to make it and your QT program Sibling directory

Now you can double-click your program to run it huh

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.