Qt World Summit: Register Today!

Failed to load platform plugin "xcb"

  • Hello Group,

    I generated executable using Qt5 beta on ubuntu 12.04. Now I copied the executable and required shared libraries to other Ubuntu 12.04(that doen't have qt5 installed) machine. But when I try to execute ./execuatble_filename, I am encountering with below error.

    Failed to load platform plugin "xcb". Available platforms are:

    Aborted (core dumped)

    I have installed below libraries.
    libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync0 libxcb-sync0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0 libxcb-render-util0-dev

    Please help me.


  • You will have to deploy the Qt plugins as well, at least the <code>xcb</code> platform plugin.

  • Please tell me how could I deploy Qt plugins or xcb platform plugins.

  • After building Qt you'll find a set of libraries in <code>qtbase/plugins</code>. You need at least <code>qtbase/plugins/platforms/xcb</code>.

  • FYI: I din't build Qt5. I have only installed it.

    Under /home/mohan/Qt5.0.0beta1/Src/Qt/5.0.0-beta1/qtbase/src/plugins/platforms/xcb, I don't see any library files

    home/mohan/Qt5.0.0beta1/Desktop/Qt/5.0.0-beta1/gcc/plugins/platforms, I found libxcb.so file

    I even tried copying this library under /usr/lib of othe linux system. But still no breakthrough.

  • I had the same issue. I had forgotten to actually install Qt i.e. after "./configure" and "make" I didn't run "make install". After "make install" everything is fixed.

  • Hi mrajanna,
    I get the same issue.
    Have you fixed it yet? Could you give me some ideas?

    hi oreja
    I trying open terminal (Ubuntu) and cd to qtbase/
    do "./configure" and "make" and "make install" , it says:
    bq. make: *** No targets specified and no makefile found. Stop.

    I don't know how to fix it...

  • I've had the exact same problem for some days now and I was wondering if anyone has found a solution and they are willing to share.

    @Failed to load platform plugin "xcb". Available platforms are:


    In my case, I install qt on one system, copy it to another system and try to build and run my application. On the system where I installed Qt, everything works fine. However, on the system where I have copied Qt and used it to build my application, I get the error:

    Both systems run Ubuntu 12.04 (32-bit). It appears the qt installer does something extra which I am yet to figure out. Any help will be appreciated

  • remove qt.conf from the folder with your app

  • There's no qt.conf file in the app folder

  • When you compile/install Qt, some paths are hard coded into qmake, thus making the copy Qt directory not working properly. Please try installing, instead of copying it.

  • Hi there,

    This is how I solved my deployment issues to 12.04.:

    "Deploying Qt5 Apps on Ubuntu 12.04":http://goblincoding.com/2013/11/07/deploying-qt-5-applications-on-ubuntu-12-04/

    Hope that helps!

  • Hi All,

    In my case, I solved the problem by explicitly specifying the QT_PLUGIN_PATH to point to <qt_installation_home>/gcc/plugins.

    PS: I subsequently encountered problems with QML modules not being found which I fixed by explicitly specifying the QML2_IMPORT_PATH to point to <qt_installation_home>/gcc/qml.

Log in to reply