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. Installation of Qt 6 on ubuntu 20.04
QtWS25 Last Chance

Installation of Qt 6 on ubuntu 20.04

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 6 Posters 366 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.
  • S Offline
    S Offline
    ShahShaj
    wrote on 28 Mar 2025, 06:28 last edited by
    #1

    Hi all,
    Since official support for Qt 5.15 is going to end soon, I am upgrading Qt to version 6 on Ubuntu 20.04.
    My environment is Deepstream 6.3 on Nvidia docker container on Ubuntu 20.04
    Is it possible to install Qt 6 on ubuntu 20.04?
    Because from https://doc.qt.io/qt-6.5/linux.html supported platform is Ubuntu 22.04
    Since I have dependency with Ubuntu 20.04, I can't upgrade it to 22.04
    Anyone please help me on this.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 28 Mar 2025, 07:21 last edited by
      #2

      Why do you want to update Qt then at all?

      https://ubuntu.com/blog/ubuntu-20-04-lts-end-of-life-standard-support-is-coming-to-an-end-heres-how-to-prepare

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • S Offline
        S Offline
        ShahShaj
        wrote on 28 Mar 2025, 07:47 last edited by ShahShaj
        #3

        @Christian-Ehrlicher Thank you so much for your information.
        Until we decide to upgrade to Ubuntu 22.04, I need to stick with Ubuntu 20.04
        Is there anyway I can install Qt version 6 on Ubuntu 20.04?
        In the page https://doc.qt.io/qt-6.5/linux.html supported platform for Qt version 6 is Ubuntu 22.04

        J 1 Reply Last reply 28 Mar 2025, 08:08
        0
        • S ShahShaj
          28 Mar 2025, 07:47

          @Christian-Ehrlicher Thank you so much for your information.
          Until we decide to upgrade to Ubuntu 22.04, I need to stick with Ubuntu 20.04
          Is there anyway I can install Qt version 6 on Ubuntu 20.04?
          In the page https://doc.qt.io/qt-6.5/linux.html supported platform for Qt version 6 is Ubuntu 22.04

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 28 Mar 2025, 08:08 last edited by
          #4

          @ShahShaj I think what @Christian-Ehrlicher tried to say is: you want to go from Qt5 to Qt6 because the support for Qt5 ends, but you use an Ubuntu version with support also ending soon. An unsupported operating system is a way bigger issue than an unsupported framework version (security fixes and such). So, you could simply continue to use Qt5 until you upgrade to a newer and supported Ubuntu version.

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

          C 1 Reply Last reply 28 Mar 2025, 08:08
          1
          • J jsulm
            28 Mar 2025, 08:08

            @ShahShaj I think what @Christian-Ehrlicher tried to say is: you want to go from Qt5 to Qt6 because the support for Qt5 ends, but you use an Ubuntu version with support also ending soon. An unsupported operating system is a way bigger issue than an unsupported framework version (security fixes and such). So, you could simply continue to use Qt5 until you upgrade to a newer and supported Ubuntu version.

            C Offline
            C Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 28 Mar 2025, 08:08 last edited by
            #5

            @jsulm Correct 🙂

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0
            • I Offline
              I Offline
              IgKh
              wrote on 28 Mar 2025, 12:45 last edited by
              #6

              @ShahShaj You CAN run Qt 6.5 and above on Ubuntu 20.04, but not with the pre-compiled packages provided by the project. There are ABI mismatches regarding glibc, OpenSSL and libwayland (and possibly more) that lead to crashes or worse. You'll need to build Qt from source code yourself.

              That said, I concur that it is a strange thing to do - an EOL base image is much worse from an IT security standpoint that an EOL graphics toolkit.

              1 Reply Last reply
              1
              • J Offline
                J Offline
                JoeCFD
                wrote on 28 Mar 2025, 13:22 last edited by JoeCFD
                #7

                Plus, your hardware might be too old for Qt 6.5 as well. For example, its multimedia module may require higher versions of gstreamer or FFmpeg which will not work with your hardware possibly. The drivers of newer versions of gstreamer or FFmpeg may not be compatible with the video card in your computer.

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  Paul Colby
                  wrote on 30 Mar 2025, 08:55 last edited by Paul Colby
                  #8

                  Hi @ShahShaj,

                  While I completely agree with everything the others have said, just for fun (and to answer the original topic question) I've tried installing Qt on Ubuntu 20.04 on GitHub Actions, via install-qt-action, which in turn uses aqtinstall - a Python-based application that installs Qt from the same public mirrors as the Qt Online Installer.

                  For my project, the result is aqtinstall successfully installs Qt 6.2 through to 6.9 on (GitHub-modified) Ubuntu 20.04.06 LTS. Note, that "GitHub modified" bit might be important - I'm not sure how much customisation GitHub does to their Ubuntu images, but you can see their customisations for yourself at https://github.com/actions/runner-images

                  (Also note, I didn't try installing Qt 6.0 or 6.1, just because I did this on a temporary branch of a project that uses Bluetooth, and Qt didn't add BLE support to the Qt 6 branch until 6.2)

                  Now, once installed, the open source project I tried this on, managed to build and pass all unit tests quite happily using gcc, but not using clang. However, it appears that the clang failures might be because of some very-modern code coverage support my project enables, so clang might work just fine if I disabled coverage reporting, but doing so was a step too far for me to both with this experiment :D

                  So, my hypothesis is that:

                  • installing Qt 6.x on Ubuntu 20.04 should be possible via aqtinstall.
                  • possibly requiring some prerequisites first though (such as some system libraries, Python, etc being installed and/or upgraded)
                  • possibly only for gcc (clang may or may not work; didn't work initially for me)

                  You can see which builds passed (ie the gcc ones) and which failed (ie the clang ones) here: https://github.com/pcolby/dokit/actions/runs/14154258108

                  You can see the modified GitHub workflow file I used here: https://github.com/pcolby/dokit/actions/runs/14154258108/workflow

                  You can see the aqtinstall commands that did the actual Qt installation by looking at the log output of the "Install online Qt version" steps, for example:

                  python3 -m aqt install-qt linux desktop 6.9.0 --autodesktop --outputdir /home/runner/work/dokit/Qt --modules qtconnectivity
                  

                  Finally, let me reiterate what others have said: absolutely try to upgrade your OS if you can (I know nothing about nVidia's Deepstream). But if you can't, then give aqtinstall a go. I'm sure it won't be easy, but should be possible...

                  Good luck :)

                  1 Reply Last reply
                  2

                  5/8

                  28 Mar 2025, 08:08

                  • Login

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