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. What is the correct approach to install Qt SDK in Ubuntu?
Forum Updated to NodeBB v4.3 + New Features

What is the correct approach to install Qt SDK in Ubuntu?

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 5 Posters 4.4k 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.
  • mrjjM mrjj

    Hi
    did you install compiler and tools?
    https://www.ics.com/blog/getting-started-qt-and-qt-creator-linux

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

    @mrjj yes I did. also, I came across this page when I was searching. Qt Creator is working fine but I couldn't manage to run qmake from the terminal. The environment variables are not set properly.

    aha_1980A 1 Reply Last reply
    0
    • C CroCo

      @mrjj yes I did. also, I came across this page when I was searching. Qt Creator is working fine but I couldn't manage to run qmake from the terminal. The environment variables are not set properly.

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

      @CroCo

      If you install Qt with the Qt installer, no environment variables are changed. qtchooser is for the Qt versions contained in Ubuntus software repositories.

      So either call qmake with full path (e.g. /opt/Qt/5.9.2/gcc_64/bin/qmake for me) or add this path to your PATH environment variable (e.g. by adding this path in your ~/.bashrc:

      export PATH=$PATH:/path/to/your/qmake
      

      Regards

      Qt has to stay free or it will die.

      C 1 Reply Last reply
      2
      • aha_1980A aha_1980

        @CroCo

        If you install Qt with the Qt installer, no environment variables are changed. qtchooser is for the Qt versions contained in Ubuntus software repositories.

        So either call qmake with full path (e.g. /opt/Qt/5.9.2/gcc_64/bin/qmake for me) or add this path to your PATH environment variable (e.g. by adding this path in your ~/.bashrc:

        export PATH=$PATH:/path/to/your/qmake
        

        Regards

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

        @aha_1980 running export ... yields this error

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

        It seems to me there is a default location that the shell searches in but I'm not able to modify it.

        aha_1980A 1 Reply Last reply
        0
        • C Offline
          C Offline
          ckvsoft
          wrote on last edited by ckvsoft
          #6

          Do you have a special reason why you do not install QT from the Ubuntu repository?

          have you try sudo apt-get install qt5-qmake

          C 1 Reply Last reply
          0
          • C CroCo

            @aha_1980 running export ... yields this error

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

            It seems to me there is a default location that the shell searches in but I'm not able to modify it.

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

            @CroCo:

            @aha_1980 running export ... yields this error

            That is because of:

            $ ll /usr/bin/qmake
            lrwxrwxrwx 1 root root 9 Dez  9  2015 /usr/bin/qmake -> qtchooser*
            

            So either call qmake with the full path or (hacky) delete /usr/bin/qmake.

            Qt has to stay free or it will die.

            C 1 Reply Last reply
            0
            • aha_1980A aha_1980

              @CroCo:

              @aha_1980 running export ... yields this error

              That is because of:

              $ ll /usr/bin/qmake
              lrwxrwxrwx 1 root root 9 Dez  9  2015 /usr/bin/qmake -> qtchooser*
              

              So either call qmake with the full path or (hacky) delete /usr/bin/qmake.

              C Offline
              C Offline
              CroCo
              wrote on last edited by
              #8

              @aha_1980 so is it Ok to copy qmake 5.10 inside that folder? I don't want to delete it since some system's files may use Qt4. I don't want to mess with it.

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

                Hi,

                No, use the full path to the version of qmake you want to use.

                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
                2
                • SGaistS SGaist

                  Hi,

                  No, use the full path to the version of qmake you want to use.

                  C Offline
                  C Offline
                  CroCo
                  wrote on last edited by
                  #10

                  @SGaist so adding environment variable is not an option here, Right?

                  1 Reply Last reply
                  0
                  • C ckvsoft

                    Do you have a special reason why you do not install QT from the Ubuntu repository?

                    have you try sudo apt-get install qt5-qmake

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

                    @ckvsoft good question. Actually, I though the version in the repository is not the latest that is why I'v chosen the suggested tool in Qt download page. Not to mention that in Qt website, there is no mention to download the library from the repository. I maybe wrong regarding whether the repository doesn't include the latest version.

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

                      It could be but you'd have to keep it up to date with each new release of Qt.

                      Unless you plan to develop with only one version of Qt, I'd recommend sticking with the use of the full path. That way you know for sure the version you are currently calling.

                      An alternative if you really want to avoid the full path is to use a symbolic link and call it something like qmake-5.10.

                      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
                      1

                      • Login

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