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. Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu
QtWS25 Last Chance

Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
13 Posts 4 Posters 7.4k Views
  • 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.
  • R Offline
    R Offline
    rmam
    wrote on last edited by
    #1

    Both Debian and Ubuntu distribute a single incomplete version of Qt through their official repositories. Thus, it's often necessary to resort to using Qt's regular installer to make available multiple versions of Qt and access recent and up-to-date versions of both Qt and related tools.

    However, installing software from third-party sources, particularly from non-Deb packages, tends to cause some problems due to conflicts or missing configuration steps.

    Therefore, does anyone know what's the best way (and better yet officially sanctioned way) to install Qt from Qt's regular installer in Debian and Ubuntu? For example, where should the files be installed? Which, if any, environment variables should be set? What additional steps and precautions should be taken to perform system-wide installations?

    jsulmJ JonBJ 2 Replies Last reply
    0
    • R rmam

      Both Debian and Ubuntu distribute a single incomplete version of Qt through their official repositories. Thus, it's often necessary to resort to using Qt's regular installer to make available multiple versions of Qt and access recent and up-to-date versions of both Qt and related tools.

      However, installing software from third-party sources, particularly from non-Deb packages, tends to cause some problems due to conflicts or missing configuration steps.

      Therefore, does anyone know what's the best way (and better yet officially sanctioned way) to install Qt from Qt's regular installer in Debian and Ubuntu? For example, where should the files be installed? Which, if any, environment variables should be set? What additional steps and precautions should be taken to perform system-wide installations?

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

      @rmam I never had any problems with Qt installed using Qt Online Installer. You can use this installer to install any supported Qt version. They will be installed in /home/USER_NAME/qt (or whatever directory you provide). So, why not simply use the Online Installer? And why do you think Qt provided by the distribution is incomplete? What is missing?

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

      R 1 Reply Last reply
      4
      • R rmam

        Both Debian and Ubuntu distribute a single incomplete version of Qt through their official repositories. Thus, it's often necessary to resort to using Qt's regular installer to make available multiple versions of Qt and access recent and up-to-date versions of both Qt and related tools.

        However, installing software from third-party sources, particularly from non-Deb packages, tends to cause some problems due to conflicts or missing configuration steps.

        Therefore, does anyone know what's the best way (and better yet officially sanctioned way) to install Qt from Qt's regular installer in Debian and Ubuntu? For example, where should the files be installed? Which, if any, environment variables should be set? What additional steps and precautions should be taken to perform system-wide installations?

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

        @rmam
        One thing you need to bear in mind is that through apt-get (which is how I get everything Qt) you do need to specify which particular "optional" bits of Qt you want, in addition to the base package. As a random example:

        sudo apt install libqt5charts5 libqt5charts5-dev
        

        is required if you need the optional Qt Charts package.

        And it is possible that individual distros occasionally have a glitch with what is available, e.g. apparently as per https://github.com/marazmista/radeon-profile/issues/66 the above works with Ubuntu 17.10 but was missing from Ubuntu 17.04....

        1 Reply Last reply
        2
        • jsulmJ jsulm

          @rmam I never had any problems with Qt installed using Qt Online Installer. You can use this installer to install any supported Qt version. They will be installed in /home/USER_NAME/qt (or whatever directory you provide). So, why not simply use the Online Installer? And why do you think Qt provided by the distribution is incomplete? What is missing?

          R Offline
          R Offline
          rmam
          wrote on last edited by
          #4

          @jsulm said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:

          So, why not simply use the Online Installer?

          If there are some overlapping files in the system then this may cause some problems. For example, after installing Qt from Qt's Online Installer Qt Creator failed to find the recently added Qt files, and instead apparently pointed to files and file locations where the official Ubuntu/Debian packages were/would be installed

          jsulmJ 1 Reply Last reply
          0
          • R rmam

            @jsulm said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:

            So, why not simply use the Online Installer?

            If there are some overlapping files in the system then this may cause some problems. For example, after installing Qt from Qt's Online Installer Qt Creator failed to find the recently added Qt files, and instead apparently pointed to files and file locations where the official Ubuntu/Debian packages were/would be installed

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

            @rmam I never had any issues with online installer. It installs Qt by default in /home/username/qt - so, there are no conflicts. You simply need to make sure your Kits in QtCreator are configured properly. If QtCreator cannot find the new installed Qt, then simply go to "Qt Versions" in QtCreator settings and add this Qt version there. Then create a Kit pointing to this Qt version.
            But usually QtCreator detects Qt. My guess is you're still using QtCreator from your Linux distribution, use the one installed via Qt Online Installer.

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

            R 1 Reply Last reply
            2
            • jsulmJ jsulm

              @rmam I never had any issues with online installer. It installs Qt by default in /home/username/qt - so, there are no conflicts. You simply need to make sure your Kits in QtCreator are configured properly. If QtCreator cannot find the new installed Qt, then simply go to "Qt Versions" in QtCreator settings and add this Qt version there. Then create a Kit pointing to this Qt version.
              But usually QtCreator detects Qt. My guess is you're still using QtCreator from your Linux distribution, use the one installed via Qt Online Installer.

              R Offline
              R Offline
              rmam
              wrote on last edited by rmam
              #6

              @jsulm said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:

              If QtCreator cannot find the new installed Qt, then simply go to "Qt Versions" in QtCreator settings and add this Qt version there. Then create a Kit pointing to this Qt version.

              After installing Qt with Qt's online installer, Qt Creator autodetected Ubuntu's default installation as well as the two Qt versions I've installed with Qt's online installer. Ubuntu's default install is listed with a yellow triangle with an exclamation mark. After uninstalling Ubuntu's qmake package, Qt Creator kept listing Ubuntu's default installation but this time displaying a red triangle with an exclamation mark.

              Apparently Qt Creator doesn't let the user to remove autodetected entries, as both the "Remove" and "Clean up" buttons is greyed out.

              Is there any way to ignore an autodetected entry?

              jsulmJ 1 Reply Last reply
              0
              • R rmam

                @jsulm said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:

                If QtCreator cannot find the new installed Qt, then simply go to "Qt Versions" in QtCreator settings and add this Qt version there. Then create a Kit pointing to this Qt version.

                After installing Qt with Qt's online installer, Qt Creator autodetected Ubuntu's default installation as well as the two Qt versions I've installed with Qt's online installer. Ubuntu's default install is listed with a yellow triangle with an exclamation mark. After uninstalling Ubuntu's qmake package, Qt Creator kept listing Ubuntu's default installation but this time displaying a red triangle with an exclamation mark.

                Apparently Qt Creator doesn't let the user to remove autodetected entries, as both the "Remove" and "Clean up" buttons is greyed out.

                Is there any way to ignore an autodetected entry?

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

                @rmam said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:

                Is there any way to ignore an autodetected entry?

                Yes - don't use it.
                Don't use the Kit which uses this autodetected Qt.
                Also, if you put mouse cursor over this yellow/red exclamation mark - what do you see?

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

                R 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @rmam said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:

                  Is there any way to ignore an autodetected entry?

                  Yes - don't use it.
                  Don't use the Kit which uses this autodetected Qt.
                  Also, if you put mouse cursor over this yellow/red exclamation mark - what do you see?

                  R Offline
                  R Offline
                  rmam
                  wrote on last edited by
                  #8

                  @jsulm said in Best way to install multiple versions of Qt with the regular installer in Debian/Ubuntu:

                  Yes - don't use it.
                  Don't use the Kit which uses this autodetected Qt.

                  Ok good to hear.

                  Also, if you put mouse cursor over this yellow/red exclamation mark - what do you see?

                  Unfortunately, nothing.

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    rmam
                    wrote on last edited by
                    #9

                    Apparently Qt Creator searches for instances of qmake within the file system to autodetect Qt installations. However, that approach is error-prone. For example, Debian/Ubuntu come with a package called qtchooser, which supposedly provides an easy way to pick between default Qt versions by updating a bunch of symlinks, including symlink from /usr/bin/qmake. However, that symlink persists even when all Qt packages are removed. Therefore, Qt Creator keeps autodetecting a zombie Qt version in Debian/Ubuntu even when no Qt version is available, just because it found a dead symlink to a qmake instance.

                    Removing the qtchooser package is a bad idea because apparently it's listed as a dependency of a bunch of other packages.

                    jsulmJ 1 Reply Last reply
                    0
                    • R rmam

                      Apparently Qt Creator searches for instances of qmake within the file system to autodetect Qt installations. However, that approach is error-prone. For example, Debian/Ubuntu come with a package called qtchooser, which supposedly provides an easy way to pick between default Qt versions by updating a bunch of symlinks, including symlink from /usr/bin/qmake. However, that symlink persists even when all Qt packages are removed. Therefore, Qt Creator keeps autodetecting a zombie Qt version in Debian/Ubuntu even when no Qt version is available, just because it found a dead symlink to a qmake instance.

                      Removing the qtchooser package is a bad idea because apparently it's listed as a dependency of a bunch of other packages.

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

                      @rmam Well, a dead symlink isn't a QtCreator issue

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

                      R 1 Reply Last reply
                      1
                      • jsulmJ jsulm

                        @rmam Well, a dead symlink isn't a QtCreator issue

                        R Offline
                        R Offline
                        rmam
                        wrote on last edited by
                        #11

                        @jsulm yes it obviously is if Qt Creator interprets a dead symlink as the presence of a full Qt installation.

                        This problem is further compounded by the fact that Qt Creator offers no way to ignore/blacklist autodetected instances of Qt.

                        jsulmJ 1 Reply Last reply
                        0
                        • R rmam

                          @jsulm yes it obviously is if Qt Creator interprets a dead symlink as the presence of a full Qt installation.

                          This problem is further compounded by the fact that Qt Creator offers no way to ignore/blacklist autodetected instances of Qt.

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

                          @rmam You can ignore autodetected Qt versions - don't use them

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

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            AndreyMor
                            wrote on last edited by
                            #13

                            I confirm that the problem identified in this thread still exist.
                            On Ubuntu, using the online installer, I have installed several version of Qt - 5.15.2 and 6.1.2, in addition to the "default" one 5.12.8 installed from a repository.
                            In Qt Creator (I have tried two versions: QtCreator 4.15.2 and 5.0.0-beta1), while 6.1.2 seems to be able to start properly (could not do a complete check on my code since some of the modules are still missing in Qt6),
                            the 5.15.2 version is bugging:
                            If I select this version in QtCreator, and compile my code, I get this error (multiple times):
                            /home/andr/Qt/5.15.2/gcc_64/bin/uic: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.15' not found (required by /home/andr/Qt/5.15.2/gcc_64/bin/uic)

                            Is there a configuration step I am missing?

                            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