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. 'No such file or directory' starting program
Forum Updated to NodeBB v4.3 + New Features

'No such file or directory' starting program

Scheduled Pinned Locked Moved General and Desktop
20 Posts 6 Posters 9.1k Views 1 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.
  • CAD_codingC Offline
    CAD_codingC Offline
    CAD_coding
    wrote on last edited by
    #2

    Such questions are not expected from a software developer :P

    1 Reply Last reply
    0
    • C Offline
      C Offline
      controlhorus
      wrote on last edited by
      #3

      Hello

      Sorry to not meet your expectatives :)

      I try to explain it something more: the program work on de development PC but is not running now in the other machine. I tried to remote debug my code from QTCreator (it debugs fine on another remote machine) but the program is not entering on my routines in this machine.

      I only can suposse QT application have some initialitation code on his own. It must be searching something on the changed machine environment that has changed.

      Perhaps you can guide me on how I can trace what is happening here.

      Or it is to download the sources, compile and debug the QTCreator itself the only solution?

      Thank you

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GrahamL
        wrote on last edited by
        #4

        Hi
        You need to deploy the Qt dependencies alongside your application.
        Please see
        http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html

        1 Reply Last reply
        0
        • C Offline
          C Offline
          controlhorus
          wrote on last edited by
          #5

          Hello Graham

          Here are linux but your help showed me what I must look for (I think :) : library dependencies (http://qt-project.org/wiki/Show_library_dependencies)

          Thank you very much

          PD: thanks also to CAD_coding: he did a good job maintaining the thread alive :P

          1 Reply Last reply
          0
          • G Offline
            G Offline
            guru
            wrote on last edited by
            #6

            Go to your application folder and then run your command in command mode...

            1 Reply Last reply
            0
            • C Offline
              C Offline
              controlhorus
              wrote on last edited by
              #7

              Hi guru

              Sorry. It sounds good but I looked for it and I am not able to find out how to start my application in command mode. All the references I found only talk about QTcreator command mode.

              Please, can you give me a link to where it is explained?

              Thank you

              1 Reply Last reply
              0
              • G Offline
                G Offline
                guru
                wrote on last edited by
                #8

                what kind of operating system did you use?

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  controlhorus
                  wrote on last edited by
                  #9

                  Hello

                  I have a linux compiled with Yocto running in a iMX6Q Sabre Lite board.

                  Thank you

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    guru
                    wrote on last edited by
                    #10

                    Hi,
                    I'm not well about yocto . Did you like to run your program through terminal mode means to go your application directory in the same terminal mode and use command ./myapp to execut your application.

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      controlhorus
                      wrote on last edited by
                      #11

                      Hello

                      I think you were talking about a special mode for QT applications.

                      That is what I am doing. I go to the linux console, then to my directory and then I try to run it. This is what I got:

                      ./myapp
                      -sh: ./myapp: No such file or directory

                      This is due, as Graham pointed, to failed dependencies. We have a new recompiled program already running with the new versions. But it would be interesting to know what file or directory is not finding the starting routines of a QT application instead of that message. As newbies we were totally confused about it when we saw it.

                      Thank you any way

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        guru
                        wrote on last edited by
                        #12

                        Hi,
                        Now you run this command in same directory
                        @ldd ./yourappname@

                        this will list all your dependencies and library files, if any files missed this will show as "not found". If all files available then it will show path of such files.

                        1 Reply Last reply
                        0
                        • C Offline
                          C Offline
                          controlhorus
                          wrote on last edited by
                          #13

                          Hello

                          Yes, we saw that utility at the link posted previously.

                          However:

                          • ldd on the revised and working version shows the implied libraries
                          • ldd on the old version shows the error:
                            /usr/bin/ldd: line 115 ./myprogram : No such file or directory

                          I deleted a libsomeone file used by working program and ldd does not crash. It lists libraries and it says libsomeone not found.

                          Curious?

                          Thanks.

                          1 Reply Last reply
                          0
                          • p3c0P Offline
                            p3c0P Offline
                            p3c0
                            Moderators
                            wrote on last edited by
                            #14

                            Is your app executable ? Or just do chmod 777 yourapp

                            157

                            1 Reply Last reply
                            0
                            • C Offline
                              C Offline
                              controlhorus
                              wrote on last edited by
                              #15

                              Hi

                              I login as root. It is -rwxr-xr-x. However I did:
                              chmod 777 myapp
                              chown root.root myapp

                              and nothing changes:
                              -sh: ./myoldapp: No such file or directory

                              Thanks

                              1 Reply Last reply
                              0
                              • p3c0P Offline
                                p3c0P Offline
                                p3c0
                                Moderators
                                wrote on last edited by
                                #16

                                Ok. May be its the problem related to compilation. Maybe you have compiled on a 64 bit machine and trying to run on 32 bit.

                                157

                                1 Reply Last reply
                                0
                                • C Offline
                                  C Offline
                                  controlhorus
                                  wrote on last edited by
                                  #17

                                  Hello

                                  I have a iMX6Q board. I upgraded the board with a linux complete image. The old image must have a Qt version and the new image is another Qt version.

                                  myoldprogram runs on oldimage but it does not run on newimage.

                                  I understood I have to recompile the program and I did so. mynewprogram runs fine in newimage.

                                  The 'no such file ..' error comes from broken dependencies (it seems). But the cuestions remaining is: Is there any way to display what file is not there?

                                  Thanks

                                  1 Reply Last reply
                                  0
                                  • p3c0P Offline
                                    p3c0P Offline
                                    p3c0
                                    Moderators
                                    wrote on last edited by
                                    #18

                                    To see dependencies use ldd.
                                    Try
                                    @ldd appname ¦ grep -i not@

                                    This will display the deps. which are not found

                                    157

                                    1 Reply Last reply
                                    0
                                    • C Offline
                                      C Offline
                                      controlhorus
                                      wrote on last edited by
                                      #19

                                      Hi

                                      Tested before. Not working

                                      Best regards

                                      [quote author="controlhorus" date="1380900225"]

                                      • ldd on the old version shows the error:
                                        /usr/bin/ldd: line 115 ./myprogram : No such file or directory
                                        [/quote]
                                      1 Reply Last reply
                                      0
                                      • B Offline
                                        B Offline
                                        bodzio131
                                        wrote on last edited by
                                        #20

                                        I had the same annoying problem (linux diagnostics rules!). I moved into LSB-ready linux, or moved executable from LSB linux into non-LSB one (I'm not sure now). Try to install LSB package or create fake mappings into your system libraries to simulate LSB libraries. I didn't find any tool which could diagnose this problem properly, let me know if you have one.

                                        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