Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Deploying Application on Linux

Deploying Application on Linux

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 5 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    unzu
    wrote on last edited by unzu
    #3

    @mrjj said in Deploying Application on Linux:

    And yes. step 4 add your app folder to the paths where the OS will try load So files.
    Could you explain that please? I thought I can put my application folder anywhere I want?

    I tried some things:

    • I am still on the computer where I build the app.
    • When I delete all library-files, the application works with the script.
    • I started adding 1 library after the other to my application folder and tried running the script. So far I added:
    1. libQt5Gui.so.5.15.2, libQt5Gui.so.5 (I added both, first is the library itself, second is the link to it.)
    2. libQt5Widgets.so.5.15.2, libQt5Widgets.so.5 (again library and link)

    Up to this point, the script still works. I think it takes the libraries that I've provided in my folder and gets the missing ones from the Qt-directory itself.

    1. libtQt5Bluetooth.so.5.15.2, libQt5Bluetooth.so.5 <- Here it starts to become strange. The script wont work anymore and I get the error-message:
    error while loading shared libraries: libQt5Concurrent.so.5: cannot open shared object file: No such file or directory
    

    What is happening here? If it was able to find all libraries before, including the QBluetooth and QConcurrent-libraries, how can it not find the QConcurrent-library anymore? I mean, its still in the Qt-directory..???

    1. Despite the strange behavior in step 3, I added libQt5Concurrent.so.5.15.2, libQt5Concurrent.so.5 and tried executing the script again. Error message:
    Cannot mix incompatible Qt library (5.12.8) with this library (5.15.2)
    

    I am really stuck and I don't know what else I could try, help is much appreciated.

    Unzu

    mrjjM 1 Reply Last reply
    0
    • U unzu

      @mrjj said in Deploying Application on Linux:

      And yes. step 4 add your app folder to the paths where the OS will try load So files.
      Could you explain that please? I thought I can put my application folder anywhere I want?

      I tried some things:

      • I am still on the computer where I build the app.
      • When I delete all library-files, the application works with the script.
      • I started adding 1 library after the other to my application folder and tried running the script. So far I added:
      1. libQt5Gui.so.5.15.2, libQt5Gui.so.5 (I added both, first is the library itself, second is the link to it.)
      2. libQt5Widgets.so.5.15.2, libQt5Widgets.so.5 (again library and link)

      Up to this point, the script still works. I think it takes the libraries that I've provided in my folder and gets the missing ones from the Qt-directory itself.

      1. libtQt5Bluetooth.so.5.15.2, libQt5Bluetooth.so.5 <- Here it starts to become strange. The script wont work anymore and I get the error-message:
      error while loading shared libraries: libQt5Concurrent.so.5: cannot open shared object file: No such file or directory
      

      What is happening here? If it was able to find all libraries before, including the QBluetooth and QConcurrent-libraries, how can it not find the QConcurrent-library anymore? I mean, its still in the Qt-directory..???

      1. Despite the strange behavior in step 3, I added libQt5Concurrent.so.5.15.2, libQt5Concurrent.so.5 and tried executing the script again. Error message:
      Cannot mix incompatible Qt library (5.12.8) with this library (5.15.2)
      

      I am really stuck and I don't know what else I could try, help is much appreciated.

      Unzu

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @unzu
      But is the error correct ?
      Did you have 5.12.8 installed at some point?

      It seems to find another version ?

      Could it be that libQt5Concurrent.so.5 is a link to other version ?

      1 Reply Last reply
      0
      • U Offline
        U Offline
        unzu
        wrote on last edited by unzu
        #5

        @mrjj said in Deploying Application on Linux:

        Did you have 5.12.8 installed at some point?

        I dont think so.
        I've setup the system a few days ago and I dont think that I have installed multiple Qt Versions.
        However, I managed to 'fix' it, it is working now:

        I was that desparate, that I copied all the Qt libraries: ALL OF 'EM! and put them in my directory.
        And you know what? ...the script works!

        I don't know why and how, but I can take my folder, put it on a different computer that never saw Qt and can run my application.
        One thing that I noticed is, that there were some libraries both in the linux-/lib/-folder and in the Qt-folder.
        For example, I took libicuuc, libicuio and so on from the linux-lib-folder, because when i ran ldd on my application, it showed the libraries there. Maybe I was supposed to take those libraries from the Qt folder?

        Currently I am very happy that it's running after spending multiple days on that issue :)
        The application doesn't detect the libqmysql-plugin right now, not sure what the cause for that is, but I am positive that there is some way to get it to work.. :)

        Thanks so far for your time and help!
        Unzu

        mrjjM 1 Reply Last reply
        1
        • U unzu

          @mrjj said in Deploying Application on Linux:

          Did you have 5.12.8 installed at some point?

          I dont think so.
          I've setup the system a few days ago and I dont think that I have installed multiple Qt Versions.
          However, I managed to 'fix' it, it is working now:

          I was that desparate, that I copied all the Qt libraries: ALL OF 'EM! and put them in my directory.
          And you know what? ...the script works!

          I don't know why and how, but I can take my folder, put it on a different computer that never saw Qt and can run my application.
          One thing that I noticed is, that there were some libraries both in the linux-/lib/-folder and in the Qt-folder.
          For example, I took libicuuc, libicuio and so on from the linux-lib-folder, because when i ran ldd on my application, it showed the libraries there. Maybe I was supposed to take those libraries from the Qt folder?

          Currently I am very happy that it's running after spending multiple days on that issue :)
          The application doesn't detect the libqmysql-plugin right now, not sure what the cause for that is, but I am positive that there is some way to get it to work.. :)

          Thanks so far for your time and help!
          Unzu

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #6

          @unzu
          Good work.
          Well normally one don't need to take system
          So files as they are already installed by the os.

          regarding libqmysql-plugin
          did you install the mysql client libs ? the plugin will try to load them.

          Nothing very bad about copying all of them.
          You could then on the clean linux, simply rename those you think you surely are not using
          and see if it still starts.

          Btw there is also
          https://github.com/probonopd/linuxdeployqt
          Only tested it a bit but not so much as when you first made a deplyment folder you can reuse it untill you switch Qt version.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mnesarco
            wrote on last edited by
            #7

            You can use linuxdeploy. It is easy peasy (note that linuxdeploy is not linuxdeployqt)

            https://github.com/linuxdeploy/linuxdeploy

            JonBJ 1 Reply Last reply
            0
            • M mnesarco

              You can use linuxdeploy. It is easy peasy (note that linuxdeploy is not linuxdeployqt)

              https://github.com/linuxdeploy/linuxdeploy

              JonBJ Online
              JonBJ Online
              JonB
              wrote on last edited by JonB
              #8

              @mnesarco
              Hi. I had heard about linuxdeployqt, but not linuxdeploy. You're not the author, are you? :) Would you care to summarize why linuxdeploy is better/preferred by you?

              1 Reply Last reply
              0
              • U Offline
                U Offline
                unzu
                wrote on last edited by
                #9

                Thanks for all the responses.

                I've already looked into linuxdeployqt, however it is mandatory to use the oldest LTS Ubuntu version, which was no option for me.
                Following the deployment guide I manged to get the app to work.
                I really like mrjj's idea to just copy the entire library-folder and to delete unneeded apps via testing on a clean linux system.

                I also managed to get the mysql-plugin to work.
                The error I made was to assume that I have to put the library into the plugins folder as mentioned in the Qt for Linux/X11 - Deployment Guide.
                If I had read the guide more carefully, I would have seen that the plugins need to be put into specific folders, eg. sqldrivers for the mysql-plugin.

                unzu

                jsulmJ 1 Reply Last reply
                0
                • U unzu

                  Thanks for all the responses.

                  I've already looked into linuxdeployqt, however it is mandatory to use the oldest LTS Ubuntu version, which was no option for me.
                  Following the deployment guide I manged to get the app to work.
                  I really like mrjj's idea to just copy the entire library-folder and to delete unneeded apps via testing on a clean linux system.

                  I also managed to get the mysql-plugin to work.
                  The error I made was to assume that I have to put the library into the plugins folder as mentioned in the Qt for Linux/X11 - Deployment Guide.
                  If I had read the guide more carefully, I would have seen that the plugins need to be put into specific folders, eg. sqldrivers for the mysql-plugin.

                  unzu

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  @unzu said in Deploying Application on Linux:

                  however it is mandatory to use the oldest LTS Ubuntu version

                  It's not.This is simply an advice to have a package which can be run on as many Linux distributions as possible. You do not have to follow this advice.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  mrjjM 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @unzu said in Deploying Application on Linux:

                    however it is mandatory to use the oldest LTS Ubuntu version

                    It's not.This is simply an advice to have a package which can be run on as many Linux distributions as possible. You do not have to follow this advice.

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by mrjj
                    #11

                    @jsulm
                    Hi
                    So linuxdeploy +Qt plugin allows to run on newer distros (to make the appDir) ? as when tried
                    linuxdeployqt it refused to do anything due to the distro being too new.

                    Also there was talk about -unsupported-allow-new-glibc options but it did not
                    know that option.

                    so linuxdeploy is more "relaxed" ?

                    That does indeed sound promising.

                    jsulmJ 1 Reply Last reply
                    0
                    • mrjjM mrjj

                      @jsulm
                      Hi
                      So linuxdeploy +Qt plugin allows to run on newer distros (to make the appDir) ? as when tried
                      linuxdeployqt it refused to do anything due to the distro being too new.

                      Also there was talk about -unsupported-allow-new-glibc options but it did not
                      know that option.

                      so linuxdeploy is more "relaxed" ?

                      That does indeed sound promising.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      @mrjj said in Deploying Application on Linux:

                      Also there was talk about -unsupported-allow-new-glibc options but it did not
                      know that option

                      See https://github.com/probonopd/linuxdeployqt/blob/master/tools/linuxdeployqt/main.cpp
                      It's -unsupported-bundle-everything or -unsupported-allow-new-glibc

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved