[Solved] How can I install a Qt Quick app (Qt 5.4) on Ubuntu 14.04?

  • I would like to have as small an installer as possible, so I'd rather not install the entire Qt. Right now, I'm updating the c++ libraries with this command:

    @sudo apt-get install g++-4.9@

    and then copying my app and a few select Qt libraries onto the target system (libQt5Widgets.so.5, libQt5Xml.so.5, libQt5OpenGL.so.5, libQt5Quick.so.5, libQt5Qml.so.5, libQt5Gui.so.5, libQt5Core.so.5, libQt5Network.so.5, libicui18n.so.53, libicuuc.so.53, and libicudata.so.53)

    When I run the app, I get these errors:

    @libGL error: failed to authenticate magic 6
    libGL error: failed to load driver: vboxvideo
    Screen size is QSize(1280, 960)
    Cannot mix incompatible Qt library (version 0x50201) with this library (version 0x50400)@

    That line about screen size comes from my program, so it's loading, just failing to run. The libGL errors are probably because I'm testing my installer in a VirtualBox, which is a whole different problem. Still working on that.

    I'm installing my app on a fresh Ubuntu 14.04 install, so I'm surprised there's a Qt library of version 5.2 lying around. How can I figure out what library it's trying to load that is the wrong version?


  • Lifetime Qt Champion


    Ubuntu also uses Qt for some of their applications.

    Anyway, "here":http://qt-project.org/doc/qt-5/linux-deployment.html#creating-the-application-package you have the technique you need to deploy your application.

  • Alas, I am still stuck!

    I've run ldd on my app (and even written a small Perl script to do a recursive ldd) and I am definitely installing every Qt library that ldd knows about. However, since the error comes after my app is up and running (as evidenced by the message in the console output), that means whatever library Qt is loading, it's doing it dynamically so ldd will be blind to it.

    Some additional information:

    • In addition to the libraries listed above, I'm also copying over libqxcb.so, and the entire directories qml/QtQuick, qml/QtQuick.2, and qml/QtGraphicalEffects.
    • I'm copying the libraries into the exact same directories on the target machine as my development machine, so I'm not worrying about setting LD_LIBRARY_PATH or any other environment variable.


  • A probably-useful clue:
    If I hide the Ubuntu libraries libQt* from /usr/lib/x86_64-linux-gnu and run my app again, it tells me
    @This application failed to start because it could not find or load the Qt platform plugin "xcb"
    Available platform plugins are: xcb@

  • I'm getting much closer ... libqxcb.so was depending on libQt5DBus.so which my main app was not (so I wasn't installing it). I would recommend updating any pages that talk about deployment to say that you should run ldd both on the main app and on any platform plugins (and other plugins) you are installing.

  • Lifetime Qt Champion

    Are you using the network module ? If so you also need the bearer plugins

  • Right now I'm not, but I'll keep that in mind if things change!

    The app is running now, it was libQt5DBus that was causing trouble.

    Thanks for all help!

  • Lifetime Qt Champion

    You're welcome !

    Since you've deployed it successfully, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

Log in to reply

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