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 a Qt application on Ubuntu 18.04
Forum Updated to NodeBB v4.3 + New Features

Deploying a Qt application on Ubuntu 18.04

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 6 Posters 9.3k Views 2 Watching
  • 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.
  • hskoglundH Offline
    hskoglundH Offline
    hskoglund
    wrote on last edited by
    #3

    Hi, the dependency on libQt5XmlPatterns.so.5 can be from one of your plugins, there's one called libqmlxmllistmodelplugin.so that tries to pull in libQt5XmlPatterns.so.5.
    However libqmlxmllistmodelplugin seems to be built with
    $ORIGIN/../../../lib
    so I think libQt5XmlPatterns.so.5 needs to be in that place relative to where libqmlxmllistmodelplugin.so is deployed.

    1 Reply Last reply
    2
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      Hi,

      You might want to consider using linuxdeployqt to help you with that matter.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • bunjee207B Offline
        bunjee207B Offline
        bunjee207
        wrote on last edited by
        #5

        Thanks for your replies,

        My application actually depends on a few libraries of my own (SkCore, SkGui...).
        Turns out I have to add the rpath line in the project of each library.

        After that ldd finds the proper dependencies and my application runs.

        PS: That does not seem to be required when building with Qt 4.

        1 Reply Last reply
        2
        • Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #6

          @bunjee207 great!, so if your issue is solved please don't forget to mark your post as such. Thanks.

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          1
          • bunjee207B bunjee207

            Greetings Qt Forums,

            I'm deploying a Qt application on Ubuntu 18.04.

            My binary is built with the following:

            unix:QMAKE_LFLAGS += "-Wl,-rpath,'\$$ORIGIN'"
            

            When I run the application I get the following:

            error while loading shared libraries: libQt5XmlPatterns.so.5 cannot open object file: No such file or directory.
            

            That's strange because the library is actually there along with the binary.

            Also, that shouldn't be related to rpath since libQt5Core.so.5 and a few others are resolved just fine.

            Has anybody got the issue before ?

            Thanks.

            B Offline
            B Offline
            borkowsk
            wrote on last edited by borkowsk
            #7

            @bunjee207 I have similar message when I start qtcreator :-/

            B 1 Reply Last reply
            0
            • B borkowsk

              @bunjee207 I have similar message when I start qtcreator :-/

              B Offline
              B Offline
              borkowsk
              wrote on last edited by
              #8

              @borkowsk
              sudo apt install qtcreator
              [sudo] password for borkowsk:
              Reading package lists... Done
              Building dependency tree
              Reading state information... Done
              qtcreator is already the newest version (4.5.2-3ubuntu2).
              0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
              borkowsk@wojciech-CELSIUS-7:~$ qtcreator
              qtcreator: error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #9

                Hi and welcome to devnet,

                Did you modify your PATH environment variable ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                B 1 Reply Last reply
                1
                • SGaistS SGaist

                  Hi and welcome to devnet,

                  Did you modify your PATH environment variable ?

                  B Offline
                  B Offline
                  borkowsk
                  wrote on last edited by borkowsk
                  #10

                  @SGaist
                  I dont think so :-) Should I do it manually?
                  This is my path and result of calling "konsole" (similar for krusader etc...)

                  borkowsk@wojciech-CELSIUS-7:~$ echo $PATH
                  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
                  borkowsk@wojciech-CELSIUS-7:~$ konsole
                  konsole: error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory

                  All this library exist but are not visible...
                  borkowsk@wojciech-CELSIUS-7:~$ ls /usr/lib/x86_64-linux-gnu/libQt5*
                  /usr/lib/x86_64-linux-gnu/libQt5Concurrent.prl /usr/lib/x86_64-linux-gnu/libQt5QuickTest.so.5
                  /usr/lib/x86_64-linux-gnu/libQt5Concurrent.so /usr/lib/x86_64-linux-gnu/libQt5QuickTest.so.5.9
                  /usr/lib/x86_64-linux-gnu/libQt5Concurrent.so.5 /usr/lib/x86_64-linux-gnu/libQt5QuickTest.so.5.9.5
                  ...
                  /usr/lib/x86_64-linux-gnu/libQt5Widgets.prl
                  ...
                  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so
                  ...
                  /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5.9 /usr/lib/x86_64-linux-gnu/libQt5Xml.so.5.9
                  /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5.9.5 /usr/lib/x86_64-linux-gnu/libQt5Xml.so.5.9.5

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    borkowsk
                    wrote on last edited by
                    #11

                    borkowsk@wojciech-CELSIUS-7:~$ file /usr/lib/x86_64-linux-gnu/libQt5Widgets.so
                    /usr/lib/x86_64-linux-gnu/libQt5Widgets.so: broken symbolic link to libQt5Widgets.so.5.9.5

                    Looks like something is missing during installation. How to fix this?

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      borkowsk
                      wrote on last edited by
                      #12

                      @borkowsk
                      This is probably due the grub crashing during installation od 18.04:

                      sudo apt-get install libQt*
                      Reading package lists... Done
                      Building dependency tree
                      Reading state information... Done
                      Note, selecting 'libqtscript4-opengl' for glob 'libQt*'
                      Note, selecting 'libqtcore4-perl' for glob 'libQt*'
                      ...
                      libqt5xmlpatterns5 is already the newest version (5.9.5-0ubuntu1).
                      libqt5xmlpatterns5 set to manually installed.
                      Some packages could not be installed. This may mean that you have
                      requested an impossible situation or if you are using the unstable
                      distribution that some required packages have not yet been created
                      or been moved out of Incoming.
                      The following information may help to resolve the situation:
                      The following packages have unmet dependencies:
                      libqtdee3 : Conflicts: libqtdee2 but 0.2.4-0ubuntu1 is to be installed
                      E: Unable to correct problems, you have held broken packages.

                      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