Nominate our 2022 Qt Champions!

[Solved] Deploy Linux application

  • Hi Folks,

    I wrote some posts about the deploying an application on Windows, but at now, I need to deploy my app on linux as well. I use Ubuntu or other Debian base systems. I tried to find any solution without to much resoults... On windows, I put the .dlls next to the .exe and my app is able to start.
    On linux, I know only the way that I add the path of librarys to the conf file. To do that, the user must have root or sudoers privileges. Can anybody tell me an more flexible way? (the statical linking is not an option to me...)


  • Hi, I wrote a "blog post": just for you :-) Look for the Linux GCC part!

    EDIT: I use the chrpath command, that's the easiest way I think to get your Qt app running in Ubuntu/Debian.

  • Some people say this issue can be solved by adding
    line in code :)
    "Linux deployment":

  • Yes, addLibraryPath() can also help, but note this:

    when you talk about Qt's libraries and how to find them, it's actually a problem in two parts:

    1. getting the OS (in this case Debian/Ubuntu) to load the DLLs needed for your Qt app, for example, etc.

    2. getting Qt itself (once your app is loaded) to find and load the the DLLs needed from the plugins folder, for example platforms\

    qApp->addLibraryPath() only help you with problem part #2, and the chrpath utility is one way to cope with problem part #1.

  • Hi,

    hskoglund's tip seems to work. Thank you very much

Log in to reply