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. Problems with qmake Debian 9 ( qmake: could not exec ....)
Forum Updated to NodeBB v4.3 + New Features

Problems with qmake Debian 9 ( qmake: could not exec ....)

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 5 Posters 5.7k 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.
  • L Offline
    L Offline
    Lenawel
    wrote on last edited by Lenawel
    #1

    Hi ,
    I just start Qt on Debian and i have a problem when i use qmake :

    qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
    

    I see on another message that i need to change PATH on /home/session/.profile . I did it and i have another error

    qmake: could not find a Qt installation of '/home/lenawel/Qt'
    

    Can you help me to try to fix it please
    Thx a lot

    jsulmJ kshegunovK 2 Replies Last reply
    0
    • L Lenawel

      Hi ,
      I just start Qt on Debian and i have a problem when i use qmake :

      qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
      

      I see on another message that i need to change PATH on /home/session/.profile . I did it and i have another error

      qmake: could not find a Qt installation of '/home/lenawel/Qt'
      

      Can you help me to try to fix it please
      Thx a lot

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Lenawel What Qt are you using? The one packaged by Debian or did you install one using online/offline installer?
      No need to change PATH! Just use absolute path to qmake when calling it.

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

      1 Reply Last reply
      3
      • Paul ColbyP Offline
        Paul ColbyP Offline
        Paul Colby
        wrote on last edited by
        #3

        @jsulm is right, there's no need to change the path.

        qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory

        That's one of the Debian (or Ubuntu, etc) installations, but obviously its missing... a little more on that in a minute.

        If you've installed Qt using the online / offline installer, then just run QMake using a full path as @jsulm suggested, eg:

        ~/opt/qt/5.10.1/gcc_64/bin/qmake
        

        Now back to the official Debian packages. Basically, Debian (and derivatives such as Ubuntu) use a "qtchooser" application such that when you run qmake, you're actually running the qtchooser front-end. eg:

        paul@paul-XPS-13-9343:~$ which qmake
        /usr/bin/qmake
        paul@paul-XPS-13-9343:~$ ls -l /usr/bin/qmake
        lrwxrwxrwx 1 root root 9 Dec 22 08:00 /usr/bin/qmake -> qtchooser
        paul@paul-XPS-13-9343:~$ 
        

        Based on the error message, it looks like your "qtchooser" is defaulting to Qt4, but you probably don't have Qt4 installed, and you probably want to be using Qt5 instead.

        So, to see what (Debian-packaged) versions of Qt you have available

        qtchooser -l
        

        Then, you can choose the version by adding -qt<version>, eg:

        paul@paul-XPS-13-9343:~$ qmake -qt4 -v
        QMake version 2.01a
        Using Qt version 4.8.7 in /usr/lib/x86_64-linux-gnu
        paul@paul-XPS-13-9343:~$ qmake -qt5 -v
        QMake version 3.1
        Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu
        paul@paul-XPS-13-9343:~$ 
        

        Again, note this is not actually QMake that is processing the -qt4 and -qt5, but the qtchooser front-end.

        You can set the default version a few ways (see the man pages for qtchooser), or you just use the full path (eg /usr/lib/qt5/bin/qmake).

        Cheers.

        PS Make you have the qt5-qmake package installed (assuming you want Qt5).

        1 Reply Last reply
        4
        • L Lenawel

          Hi ,
          I just start Qt on Debian and i have a problem when i use qmake :

          qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
          

          I see on another message that i need to change PATH on /home/session/.profile . I did it and i have another error

          qmake: could not find a Qt installation of '/home/lenawel/Qt'
          

          Can you help me to try to fix it please
          Thx a lot

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by kshegunov
          #4

          Is debian 9 (I believe stretch) the current stable? I use testing so I don't follow the releases closely.

          @Lenawel said in Problems with qmake Debian 9 ( qmake: could not exec ....):

          qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory

          You don't have that qmake (for qt4).

          I see on another message that i need to change PATH on /home/session/.profile

          Nope, this is wrong.
          Just install qt5-qmake and qt5-default to get the release's qt5 qmake installed and set as default. Additionally if you're developing with Qt you'll need libqt5XXX, where XXX is the module name and libqt5XXX-dev for the development package (headers and debug information). Browse the official repo for more packages you might be interested in (each Qt module is packaged separately on debian).

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          2
          • L Offline
            L Offline
            Lenawel
            wrote on last edited by
            #5

            Thx for your answer i will try it .
            I use online installer and my version is Qt 5.10.1 in debian 9 64 bits

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

              Hi,

              In that case, you have to use the full path to the qmake executable you want to use.

              That's a good habit to take so you are sure of which version of Qt you are 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
              2

              • Login

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