Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Installation problems
Forum Updated to NodeBB v4.3 + New Features

Installation problems

Scheduled Pinned Locked Moved Solved Installation and Deployment
16 Posts 3 Posters 2.2k 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.
  • SGaistS SGaist

    Hi and welcome to devnet,

    1. Windows: if you want to run your application outside of Qt Creator, you have to follow the Windows deployment procedure. The most simple here is to call windeployqt that will copy everything needed for your application in the right place. Do NOT modify your PATH environment variable system wide.

    2. Run ldd on your application to see what might be missing

    As for your console application issue, if you call exec on your QCoreApplication object then it's normal that it doesn't quit as there's an event loop running. If you don't need an event loop, just return 0 without calling exec.

    C Offline
    C Offline
    Colins2
    wrote on last edited by
    #3

    @SGaist
    Many thanks for the info.
    Wow, such a lot of files to deploy! Using windeployqt worked fine but couldn't find any documentation on it just what was in the builtin help. I searched the help but only found references to Android, QNX and embedded Linux devices.

    re. exec - thanks, that wasn't explained.

    There are quite a few differences to get used to as I've been using Borland/Embarcadero since the early 90s but as a hobby programmer, not a professional.
    Colin

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

      There are pages for deployment on all platforms. You can see documentation for windeployqt here.

      Qt is a framework that provides lots of possibilities, you will have several libraries linked to your application that you will have to deploy. That's completely normal, no worries :-)

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

      C 1 Reply Last reply
      1
      • SGaistS SGaist

        There are pages for deployment on all platforms. You can see documentation for windeployqt here.

        Qt is a framework that provides lots of possibilities, you will have several libraries linked to your application that you will have to deploy. That's completely normal, no worries :-)

        C Offline
        C Offline
        Colins2
        wrote on last edited by Colins2
        #5

        @SGaist
        Hi,
        I still have the Linux problem mentioned in my original post.
        I can compile this small console app (from the Udemy course) but it will not run from the IDE.
        I get the following message:

        19:50:30: Starting /home/colins2/Qt_Programs/build-qtc14-Linux-Release/qtc14...
        19:50:30: The process failed to start. Either the invoked program "/home/colins2/Qt_Programs/build-qtc14-Linux-Release/qtc14" is missing, or you may have insufficient permissions to invoke the program.
        19:50:30: Cannot change to working directory "/home/colins2/Qt_Programs/build-qtc14-Linux-Release": No such file or directory
        19:50:30: /home/colins2/Qt_Programs/build-qtc14-Linux-Release/qtc14 exited with code -1

        The program, i.e. the compiled executable is there in the directory specified.
        The directory and file are owned by me with the correct user ID in all the profile paths in Qt.
        There are no compilation errors and the linker manages to create the folder and put the executable in there.
        Why can the IDE not find it at run time?
        If I open a terminal window in that directory I can run the program manually without any errors.

        So, Qt compiles the program without errors.
        The linker creates the directory specified in the profile and puts the 'o' file and the executable in there.
        The executable runs from the command line without errors.
        The IDE cannot find or access the directory.

        This only happens with a command line app. If I create a simple GUI app, it works from the IDE.

        I hope someone has some idea of what is wrong.
        Thanks
        Colin

        BTW, the same example app compiles and runs from my Windows 10 installation, albeit very slowly

        aha_1980A 1 Reply Last reply
        0
        • C Colins2

          @SGaist
          Hi,
          I still have the Linux problem mentioned in my original post.
          I can compile this small console app (from the Udemy course) but it will not run from the IDE.
          I get the following message:

          19:50:30: Starting /home/colins2/Qt_Programs/build-qtc14-Linux-Release/qtc14...
          19:50:30: The process failed to start. Either the invoked program "/home/colins2/Qt_Programs/build-qtc14-Linux-Release/qtc14" is missing, or you may have insufficient permissions to invoke the program.
          19:50:30: Cannot change to working directory "/home/colins2/Qt_Programs/build-qtc14-Linux-Release": No such file or directory
          19:50:30: /home/colins2/Qt_Programs/build-qtc14-Linux-Release/qtc14 exited with code -1

          The program, i.e. the compiled executable is there in the directory specified.
          The directory and file are owned by me with the correct user ID in all the profile paths in Qt.
          There are no compilation errors and the linker manages to create the folder and put the executable in there.
          Why can the IDE not find it at run time?
          If I open a terminal window in that directory I can run the program manually without any errors.

          So, Qt compiles the program without errors.
          The linker creates the directory specified in the profile and puts the 'o' file and the executable in there.
          The executable runs from the command line without errors.
          The IDE cannot find or access the directory.

          This only happens with a command line app. If I create a simple GUI app, it works from the IDE.

          I hope someone has some idea of what is wrong.
          Thanks
          Colin

          BTW, the same example app compiles and runs from my Windows 10 installation, albeit very slowly

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #6

          Hi @Colins2,

          please run ls -l /path/to/your/exe, file /path/to/your/exe and ldd /path/to/your/exe and print the output here.

          How did you install Qt under Linux?

          Regards

          Qt has to stay free or it will die.

          C 1 Reply Last reply
          0
          • aha_1980A aha_1980

            Hi @Colins2,

            please run ls -l /path/to/your/exe, file /path/to/your/exe and ldd /path/to/your/exe and print the output here.

            How did you install Qt under Linux?

            Regards

            C Offline
            C Offline
            Colins2
            wrote on last edited by
            #7

            @aha_1980
            Hi,

            colins2@HPZ420-Debian:~$ ls -l ~/Qt_Programs/build-qtc14-Linux-Release
            total 48
            -rw-r--r-- 1 colins2 colins2 5976 Nov 10 19:48 main.o
            -rw-r--r-- 1 colins2 colins2 20404 Nov 10 19:48 Makefile
            -rwxr-xr-x 1 colins2 colins2 17872 Nov 10 19:48 qtc14
            colins2@HPZ420-Debian:~$
            colins2@HPZ420-Debian:~$ file ~/Qt_Programs/build-qtc14-Linux-Release
            /home/colins2/Qt_Programs/build-qtc14-Linux-Release: directory
            colins2@HPZ420-Debian:~$ ldd ~/Qt_Programs/build-qtc14-Linux-Release
            ldd: /home/colins2/Qt_Programs/build-qtc14-Linux-Release: not regular file
            colins2@HPZ420-Debian:~$

            I installed Qt through the Debian package manager.
            Thanks

            aha_1980A 1 Reply Last reply
            0
            • C Colins2

              @aha_1980
              Hi,

              colins2@HPZ420-Debian:~$ ls -l ~/Qt_Programs/build-qtc14-Linux-Release
              total 48
              -rw-r--r-- 1 colins2 colins2 5976 Nov 10 19:48 main.o
              -rw-r--r-- 1 colins2 colins2 20404 Nov 10 19:48 Makefile
              -rwxr-xr-x 1 colins2 colins2 17872 Nov 10 19:48 qtc14
              colins2@HPZ420-Debian:~$
              colins2@HPZ420-Debian:~$ file ~/Qt_Programs/build-qtc14-Linux-Release
              /home/colins2/Qt_Programs/build-qtc14-Linux-Release: directory
              colins2@HPZ420-Debian:~$ ldd ~/Qt_Programs/build-qtc14-Linux-Release
              ldd: /home/colins2/Qt_Programs/build-qtc14-Linux-Release: not regular file
              colins2@HPZ420-Debian:~$

              I installed Qt through the Debian package manager.
              Thanks

              aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #8

              @Colins2 said in Installation problems:

              Please repeat the commands for ~/Qt_Programs/build-qtc14-Linux-Release/qtc14

              Qt has to stay free or it will die.

              C 1 Reply Last reply
              0
              • aha_1980A aha_1980

                @Colins2 said in Installation problems:

                Please repeat the commands for ~/Qt_Programs/build-qtc14-Linux-Release/qtc14

                C Offline
                C Offline
                Colins2
                wrote on last edited by
                #9

                @aha_1980

                colins2@HPZ420-Debian:~$ ls -l ~/Qt_Programs/build-qtc14-Linux-Release/qtc14
                -rwxr-xr-x 1 colins2 colins2 17872 Nov 10 19:48 /home/colins2/Qt_Programs/build-qtc14-Linux-Release/qtc14
                colins2@HPZ420-Debian:~$ file ~/Qt_Programs/build-qtc14-Linux-Release/qtc14
                /home/colins2/Qt_Programs/build-qtc14-Linux-Release/qtc14: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=2445a751f0a03c5e262fdb646e579407df250cf6, not stripped
                colins2@HPZ420-Debian:~$ ldd ~/Qt_Programs/build-qtc14-Linux-Release/qtc14
                linux-vdso.so.1 (0x00007fff8578b000)
                libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f1a5f65e000)
                libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1a5f63d000)
                libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1a5f4b9000)
                libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1a5f336000)
                libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1a5f31c000)
                libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1a5f15b000)
                libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1a5ef3b000)
                libicui18n.so.63 => /lib/x86_64-linux-gnu/libicui18n.so.63 (0x00007f1a5ec60000)
                libicuuc.so.63 => /lib/x86_64-linux-gnu/libicuuc.so.63 (0x00007f1a5ea91000)
                libpcre2-16.so.0 => /lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007f1a5ea16000)
                libdouble-conversion.so.1 => /lib/x86_64-linux-gnu/libdouble-conversion.so.1 (0x00007f1a5e9ff000)
                libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1a5e9fa000)
                libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f1a5e8d9000)
                /lib64/ld-linux-x86-64.so.2 (0x00007f1a5fb8d000)
                libicudata.so.63 => /lib/x86_64-linux-gnu/libicudata.so.63 (0x00007f1a5cee9000)
                libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f1a5ce75000)
                colins2@HPZ420-Debian:~$

                aha_1980A 1 Reply Last reply
                0
                • C Colins2

                  @aha_1980

                  colins2@HPZ420-Debian:~$ ls -l ~/Qt_Programs/build-qtc14-Linux-Release/qtc14
                  -rwxr-xr-x 1 colins2 colins2 17872 Nov 10 19:48 /home/colins2/Qt_Programs/build-qtc14-Linux-Release/qtc14
                  colins2@HPZ420-Debian:~$ file ~/Qt_Programs/build-qtc14-Linux-Release/qtc14
                  /home/colins2/Qt_Programs/build-qtc14-Linux-Release/qtc14: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=2445a751f0a03c5e262fdb646e579407df250cf6, not stripped
                  colins2@HPZ420-Debian:~$ ldd ~/Qt_Programs/build-qtc14-Linux-Release/qtc14
                  linux-vdso.so.1 (0x00007fff8578b000)
                  libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f1a5f65e000)
                  libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1a5f63d000)
                  libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1a5f4b9000)
                  libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1a5f336000)
                  libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1a5f31c000)
                  libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1a5f15b000)
                  libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1a5ef3b000)
                  libicui18n.so.63 => /lib/x86_64-linux-gnu/libicui18n.so.63 (0x00007f1a5ec60000)
                  libicuuc.so.63 => /lib/x86_64-linux-gnu/libicuuc.so.63 (0x00007f1a5ea91000)
                  libpcre2-16.so.0 => /lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007f1a5ea16000)
                  libdouble-conversion.so.1 => /lib/x86_64-linux-gnu/libdouble-conversion.so.1 (0x00007f1a5e9ff000)
                  libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1a5e9fa000)
                  libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f1a5e8d9000)
                  /lib64/ld-linux-x86-64.so.2 (0x00007f1a5fb8d000)
                  libicudata.so.63 => /lib/x86_64-linux-gnu/libicudata.so.63 (0x00007f1a5cee9000)
                  libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f1a5ce75000)
                  colins2@HPZ420-Debian:~$

                  aha_1980A Offline
                  aha_1980A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  @Colins2 That looks all pretty good.

                  So if it does not run in Creator, there might be some environment variables screwed up.

                  If you have a recent Creator version, you can right click on a file in the project tree and choose "Open terminal with Run environment" and repeat the steps from above.

                  Regards

                  Qt has to stay free or it will die.

                  C 1 Reply Last reply
                  0
                  • aha_1980A aha_1980

                    @Colins2 That looks all pretty good.

                    So if it does not run in Creator, there might be some environment variables screwed up.

                    If you have a recent Creator version, you can right click on a file in the project tree and choose "Open terminal with Run environment" and repeat the steps from above.

                    Regards

                    C Offline
                    C Offline
                    Colins2
                    wrote on last edited by
                    #11

                    @aha_1980

                    Okay, I opened the terminal right-clicking from within the IDE as you said. Here's the output:

                    colins2@HPZ420-Debian:~$ ls -l ~/Qt_Programs/build-qtc14-Linux-Release/qtc14
                    -rwxr-xr-x 1 colins2 colins2 17872 Nov 10 19:48 /home/colins2/Qt_Programs/build-qtc14-Linux-Release/qtc14
                    colins2@HPZ420-Debian:~$ file ~/Qt_Programs/build-qtc14-Linux-Release/qtc14
                    /home/colins2/Qt_Programs/build-qtc14-Linux-Release/qtc14: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=2445a751f0a03c5e262fdb646e579407df250cf6, not stripped
                    colins2@HPZ420-Debian:~$ ldd ~/Qt_Programs/build-qtc14-Linux-Release/qtc14
                    linux-vdso.so.1 (0x00007fff8578b000)
                    libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f1a5f65e000)
                    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1a5f63d000)
                    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1a5f4b9000)
                    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1a5f336000)
                    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1a5f31c000)
                    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1a5f15b000)
                    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1a5ef3b000)
                    libicui18n.so.63 => /lib/x86_64-linux-gnu/libicui18n.so.63 (0x00007f1a5ec60000)
                    libicuuc.so.63 => /lib/x86_64-linux-gnu/libicuuc.so.63 (0x00007f1a5ea91000)
                    libpcre2-16.so.0 => /lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007f1a5ea16000)
                    libdouble-conversion.so.1 => /lib/x86_64-linux-gnu/libdouble-conversion.so.1 (0x00007f1a5e9ff000)
                    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1a5e9fa000)
                    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f1a5e8d9000)
                    /lib64/ld-linux-x86-64.so.2 (0x00007f1a5fb8d000)
                    libicudata.so.63 => /lib/x86_64-linux-gnu/libicudata.so.63 (0x00007f1a5cee9000)
                    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f1a5ce75000)
                    colins2@HPZ420-Debian:~$

                    The IDE is obviously finding the source files to compile but there is no way to select the debug or release directory from within the IDE.

                    As the source code is in ~/Qt_Programs/qtc14, is it normal for the compiled program to be in a completely separate directory, i.e. ~/Qt_Programs/build-qtc14-Linux-Release/qtc14?
                    I'd have expected it to be more like the Windows version and to have created build and release directories under the source directory, e.g.
                    ~/Qt_Programs/qtc14/Build....... and ~/Qt_Programs/qtc14/Release?
                    I'm restricted to a 10 minute rule on posts at the moment.

                    .

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      Colins2
                      wrote on last edited by
                      #12

                      I just tried modifying the Build and Release directories as mentioned above to:
                      ~/Qt_Programs/qtc14/Build/Release and
                      ~/Qt_Programs/qtc14/Build/Debug

                      which to me, are more logical, but I got the same errors.
                      The files are built in the specified directory and both versions are executable from a terminal window.
                      Neither will run from the IDE but the error message does reflect the new paths.

                      I'm baffled!

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

                        What version of Debian are you using ?

                        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
                        0
                        • C Offline
                          C Offline
                          Colins2
                          wrote on last edited by
                          #14

                          Hi,
                          Here are my system details:
                          Debian version.png

                          and

                          Qt_Version.png

                          C 1 Reply Last reply
                          0
                          • C Colins2

                            Hi,
                            Here are my system details:
                            Debian version.png

                            and

                            Qt_Version.png

                            C Offline
                            C Offline
                            Colins2
                            wrote on last edited by
                            #15

                            @aha_1980 @SGaist

                            More info:

                            I also have a Linux Mint 19.0 boot so I downloaded the installation direct from Qt.io for 64 bit Linux.
                            This installer ran and downloaded all the necessary tools.

                            I re-created the simple console app from above and it runs perfectly from the IDE (as you would expect)
                            Qt Creator is a different version to the one I have in Debian, maybe I'd be better off deleting the Debian installation and downloading direct from Qt.io.

                            Qt version.png

                            C 1 Reply Last reply
                            2
                            • C Colins2

                              @aha_1980 @SGaist

                              More info:

                              I also have a Linux Mint 19.0 boot so I downloaded the installation direct from Qt.io for 64 bit Linux.
                              This installer ran and downloaded all the necessary tools.

                              I re-created the simple console app from above and it runs perfectly from the IDE (as you would expect)
                              Qt Creator is a different version to the one I have in Debian, maybe I'd be better off deleting the Debian installation and downloading direct from Qt.io.

                              Qt version.png

                              C Offline
                              C Offline
                              Colins2
                              wrote on last edited by
                              #16

                              Solved!
                              Or, at least, problem overcome.
                              I just couldn't find anything wrong, nor any setting that would stop the program running so I deleted the whole Qt installation and then downloaded and ran the installer from Qt.io as I had with the Mint installation.
                              I am very pleased to say that everything works as expected now.

                              I still have no idea what the problem was except that it was an older version in the Debian repo and maybe it wasn't totally compatible with the latest distro?

                              I'll mark this as 'solved' even though the initial problem was not really solved. I guess the moral is to always get the software direct from the Qt site and not from a repo.

                              1 Reply Last reply
                              2

                              • Login

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