Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. error while loading shared libraries: libQt5Mqtt.so.5: cannot open shared object file: No such file or directory
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
18 Posts 5 Posters 5.1k Views 3 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.
  • N Offline
    N Offline
    Naveen T
    wrote on last edited by
    #9

    @JonB As you told to check

    "file -L  <path-to>/libQt5Mqtt.so.5"
    

    this file reporting like this

     <path-to>/libQt5Mqtt.so.5 : ELF 32-bit LSB shared object, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=c48b16491d020bdc39946b012c7f0ae9038652e9, stripped
    

    Thank you

    JonBJ 1 Reply Last reply
    0
    • N Naveen T

      @JonB As you told to check

      "file -L  <path-to>/libQt5Mqtt.so.5"
      

      this file reporting like this

       <path-to>/libQt5Mqtt.so.5 : ELF 32-bit LSB shared object, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=c48b16491d020bdc39946b012c7f0ae9038652e9, stripped
      

      Thank you

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #10

      @Naveen-T
      OK, so we go back to the original message you reported (that's still the case, isn't it?):

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

      together with

      When i am trying to run ldd <path-to>/libQt5Mqtt.so.5 this it replying as

      not a dynamic executable

      According to me, ldd does follow symbolic links, so I don't understand how your ldd can return "not a dynamic executable" when file says "dynamically linked".

      I have to say i am still concerned as to what paths you are testing. I would try exactly (please use copy & paste) the following two commands one more time:

      file /home/local/Qt/5.9.1/Boot2Qt/nitrogen6x/toolchain/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/libQt5Mqtt.so.5.15.0
      
      ldd /home/local/Qt/5.9.1/Boot2Qt/nitrogen6x/toolchain/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/libQt5Mqtt.so.5.15.0
      
      1 Reply Last reply
      0
      • N Offline
        N Offline
        Naveen T
        wrote on last edited by Naveen T
        #11

        @JonB

        Same result am getting like ldd returns " not a dynamic executable " and file returns "dynamically linked, " .
        This is the complete error i m getting

        /opt/<myProjectName>/bin/<myProjectName>: error while loading shared libraries: libQt5Mqtt.so.5: cannot open shared object file: No such file or directory
        

        do I need to create same structure in my project??

        JonBJ 1 Reply Last reply
        0
        • N Naveen T

          @JonB

          Same result am getting like ldd returns " not a dynamic executable " and file returns "dynamically linked, " .
          This is the complete error i m getting

          /opt/<myProjectName>/bin/<myProjectName>: error while loading shared libraries: libQt5Mqtt.so.5: cannot open shared object file: No such file or directory
          

          do I need to create same structure in my project??

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #12

          @Naveen-T
          No, I think you need to resolve this error!

          Look, I know nothing about your "target devices" etc. I don't even know where you are running the ldd/file commands, I'm thinking you have cross-compilation involved. Is it possible that, on whatever machine you run those from, the "ELF, ARM, EABI5" is not a "dynamic executable" because it is for a different architecture??

          Apart from that, I think I will bow out, because I have no idea what situation you are in....

          1 Reply Last reply
          1
          • N Naveen T

            Hi.
            I am using Qt 5.9.1,i am trying to connect MS Azure IoT Hub using QMqtt Protocol through the Boot2Qt device , while running this application to device, i am getting this error like

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

            i have already installed Mqtt library and i am following this link to connect Ms Azure IoT Hub.

            Please help me..

            Thanks

            Pablo J. RoginaP Offline
            Pablo J. RoginaP Offline
            Pablo J. Rogina
            wrote on last edited by
            #13

            @Naveen-T said in error while loading shared libraries: libQt5Mqtt.so.5: cannot open shared object file: No such file or directory:

            i have already installed Mqtt library

            Please tell us how you installed that library, and where in the device it got installed.

            In addtion, could you describe what device it is?

            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
            0
            • N Offline
              N Offline
              Naveen T
              wrote on last edited by
              #14

              @Pablo-J-Rogina @JonB

              I installed the "QMqtt" using this link and it worked fine for desktop. Now m trying to cross compile it for development kit (Variscite Devlopment kit) and wanted to deploy to it. So for that i have installed QMqtt in device platform folder as explained in above link. I found the issue when m going to create an object of QMqttClient and try to call any function of MqttClient class.

              QMqttClient *client;
              client->setPort(8883);
              

              Thank You

              Pablo J. RoginaP 1 Reply Last reply
              0
              • N Naveen T

                @Pablo-J-Rogina @JonB

                I installed the "QMqtt" using this link and it worked fine for desktop. Now m trying to cross compile it for development kit (Variscite Devlopment kit) and wanted to deploy to it. So for that i have installed QMqtt in device platform folder as explained in above link. I found the issue when m going to create an object of QMqttClient and try to call any function of MqttClient class.

                QMqttClient *client;
                client->setPort(8883);
                

                Thank You

                Pablo J. RoginaP Offline
                Pablo J. RoginaP Offline
                Pablo J. Rogina
                wrote on last edited by
                #15

                @Naveen-T from that topic you referred, it's not clear for me if the OP is cross-compiling (I guess not in that case).

                Since you didn't mention yet, are you cross-compiling Qt for this Variscite device? (I guess yes due to .../toolchain/sysroots/... in your previous post)

                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
                • N Offline
                  N Offline
                  Naveen T
                  wrote on last edited by
                  #16

                  @Pablo-J-Rogina Yes i am cross compiling Qt for Variscite device. So i need to add or install those all files inside device?

                  jsulmJ Pablo J. RoginaP 2 Replies Last reply
                  0
                  • N Naveen T

                    @Pablo-J-Rogina Yes i am cross compiling Qt for Variscite device. So i need to add or install those all files inside device?

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

                    @Naveen-T said in error while loading shared libraries: libQt5Mqtt.so.5: cannot open shared object file: No such file or directory:

                    install those all files inside device?

                    Yes, and your sysroot if you want to cross compile.

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

                    1 Reply Last reply
                    0
                    • N Naveen T

                      @Pablo-J-Rogina Yes i am cross compiling Qt for Variscite device. So i need to add or install those all files inside device?

                      Pablo J. RoginaP Offline
                      Pablo J. RoginaP Offline
                      Pablo J. Rogina
                      wrote on last edited by
                      #18

                      @Naveen-T said in error while loading shared libraries: libQt5Mqtt.so.5: cannot open shared object file: No such file or directory:

                      So i need to add or install those all files inside device?

                      For cross-compilation you need your libraries + headers installed properly in target device, then copy (synchronize) some folders from your target device into the sysroot folder in your host PC and only then attempt to build (cross-compile) any component (Qt framework, MQTT modules, your application).

                      Once you have the components created in your host PC (but prepared to be run in your target device) then you need to make them available (copy or syncronize) them into the target!

                      Please take a look at this guide for cross-compiling Qt for RPi; I know it's not your actual device but it may shade some light about the whole cross-compilation process

                      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
                      0

                      • Login

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