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



  • I want to deploy my application on a system which doesn't have Qt installed. I have copied all the dependencies. But when I start my app I get an error.

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

    Available platform plugins are: xcb (from ./SCoMoS), xcb.

    Reinstalling the application may fix this problem.
    Aborted (core dumped)

    ldd output:

    linux-vdso.so.1 => (0x00007fff8ad38000)
    libEncryption.so.1 (0x00007f4ebac8a000)
    libQt5Widgets.so.5 (0x00007f4eba446000)
    libQt5Sql.so.5 (0x00007f4eba205000)
    libQt5Gui.so.5 (0x00007f4eb9ae2000)
    libQt5Core.so.5 (0x00007f4eb93ad000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4eb908f000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4eb8e79000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4eb8ab2000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4eb8894000)
    libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f4eb8643000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f4eb833a000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f4eb8005000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4eb7cff000)
    libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f4eb7a98000)
    libicui18n.so.52 => /usr/lib/x86_64-linux-gnu/libicui18n.so.52 (0x00007f4eb7690000)
    libicuuc.so.52 => /usr/lib/x86_64-linux-gnu/libicuuc.so.52 (0x00007f4eb7317000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4eb7112000)
    libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f4eb6f10000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4eb6d08000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f4ebae95000)
    libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f4eb6aff000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f4eb68c1000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f4eb66a2000)
    libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f4eb647a000)
    libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f4eb6268000)
    libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f4eb6065000)
    libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f4eb5e5e000)
    libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f4eb5c5c000)
    libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f4eb5a45000)
    libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f4eb583f000)
    libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f4eb563c000)
    libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f4eb5439000)
    libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f4eb5232000)
    libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f4eb5030000)
    libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f4eb4e2a000)
    libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f4eb4c1d000)
    libicudata.so.52 => /usr/lib/x86_64-linux-gnu/libicudata.so.52 (0x00007f4eb33b0000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f4eb31ab000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f4eb2fa5000)

    Please tell me where I am going wrong



  • ldd output from libqxcb.so(this from a machine where qt is installed)

    linux-vdso.so.1 => (0x00007fff239fe000)
    libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fba66f66000)
    libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fba66d56000)
    libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007fba66b4d000)
    libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007fba66931000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fba6672d000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fba6650d000)
    libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fba662d1000)
    libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fba6602e000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fba65d25000)
    libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fba65b1b000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fba657e6000)
    libQt5DBus.so.5 => /opt/Qt5.3.1/5.3/gcc_64/plugins/platforms/../../lib/libQt5DBus.so.5 (0x00007fba65561000)
    libQt5Gui.so.5 => /opt/Qt5.3.1/5.3/gcc_64/plugins/platforms/../../lib/libQt5Gui.so.5 (0x00007fba64e3e000)
    libQt5Core.so.5 => /opt/Qt5.3.1/5.3/gcc_64/plugins/platforms/../../lib/libQt5Core.so.5 (0x00007fba6470a000)
    libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007fba644a3000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fba64285000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fba63f81000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fba63c7a000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fba638b4000)
    libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fba636a2000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fba6349c000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fba674bb000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fba63298000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fba63092000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fba62e67000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fba62c4e000)
    libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007fba62a28000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fba627e9000)
    libicui18n.so.52 => /opt/Qt5.3.1/5.3/gcc_64/plugins/platforms/../../lib/libicui18n.so.52 (0x00007fba623c9000)
    libicuuc.so.52 => /opt/Qt5.3.1/5.3/gcc_64/plugins/platforms/../../lib/libicuuc.so.52 (0x00007fba62040000)
    libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007fba61e3e000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fba61c36000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fba61a1f000)
    libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007fba617f8000)
    libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fba615f5000)
    libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fba613ee000)
    libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007fba611d7000)
    libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007fba60fd2000)
    libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007fba60dce000)
    libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007fba60bcb000)
    libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007fba609c5000)
    libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007fba607c2000)
    libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007fba605bc000)
    libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007fba603b0000)
    libicudata.so.52 => /opt/Qt5.3.1/5.3/gcc_64/plugins/platforms/../../lib/libicudata.so.52 (0x00007fba5eb44000)

    I have copied this libqxcb from above in my new machine.


  • Lifetime Qt Champion



  • no. I dint follow



  • I am able to open the app now but I cannot connect to DB getting QMYSQL driver not loaded error


  • Moderators

    Did you deploy the MYSQL plugin?

    See the diagram "here":http://qt-project.org/wiki/Deploy_an_Application_on_Windows. Add "sqldrivers/qsqlmysql.so" instead of "imageformats/qjpeg.dll".


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.