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. Ubuntu 22.04, Qt5.15.x: can't sudo apt install many build dependency packages - how to solve?

Ubuntu 22.04, Qt5.15.x: can't sudo apt install many build dependency packages - how to solve?

Scheduled Pinned Locked Moved Solved Installation and Deployment
11 Posts 4 Posters 6.6k 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.
  • L Offline
    L Offline
    LowLevelM
    wrote on 2 Nov 2022, 12:02 last edited by LowLevelM 11 Mar 2022, 08:01
    #1

    i try to build Qt 5.15.x on a fresh install of Ubuntu 22.04

    following this guide: https://wiki.qt.io/Building_Qt_5_from_Git

    im failing very early on installing the build dependencies, many
    packages are not installable

    linux@linux-virtual-machine:~$ sudo apt-get build-dep qtbase5-dev
    [sudo] password for linux: 
    Reading package lists... Done
    Picking 'qtbase-opensource-src' as source package instead of 'qtbase5-dev'
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     builddeps:qtbase-opensource-src : Depends: debhelper-compat (= 13) but it is not installable
                                       Depends: default-libmysqlclient-dev but it is not installable
                                       Depends: dh-exec but it is not installable
                                       Depends: firebird-dev but it is not going to be installed
                                       Depends: freetds-dev but it is not installable
                                       Depends: libasound2-dev but it is not installable
                                       Depends: libatspi2.0-dev but it is not installable
                                       Depends: libcups2-dev but it is not installable
                                       Depends: libdbus-1-dev but it is not installable
                                       Depends: libfontconfig1-dev but it is not installable
                                       Depends: libfreetype6-dev but it is not installable
                                       Depends: libgbm-dev but it is not installable
                                       Depends: libgles-dev but it is not installable
                                       Depends: libglib2.0-dev but it is not installable
                                       Depends: libgtk-3-dev but it is not installable
                                       Depends: libharfbuzz-dev (>= 1.6.0~) but it is not installable
                                       Depends: libinput-dev but it is not installable
                                       Depends: libjpeg-dev but it is not installable
                                       Depends: libkrb5-dev but it is not installable
                                       Depends: libmtdev-dev but it is not installable
                                       Depends: libpcre2-dev but it is not installable
                                       Depends: libpng-dev but it is not installable
                                       Depends: libpq-dev but it is not installable
                                       Depends: libproxy-dev but it is not installable
                                       Depends: libpulse-dev but it is not installable
                                       Depends: libsqlite3-dev but it is not installable
                                       Depends: libudev-dev but it is not installable
                                       Depends: libx11-xcb-dev but it is not installable
                                       Depends: libxcb-glx0-dev but it is not installable
                                       Depends: libxcb-icccm4-dev but it is not installable
                                       Depends: libxcb-image0-dev but it is not installable
                                       Depends: libxcb-keysyms1-dev but it is not installable
                                       Depends: libxcb-randr0-dev but it is not installable
                                       Depends: libxcb-render-util0-dev but it is not installable
                                       Depends: libxcb-render0-dev but it is not installable
                                       Depends: libxcb-shape0-dev but it is not installable
                                       Depends: libxcb-shm0-dev but it is not installable
                                       Depends: libxcb-sync-dev but it is not installable
                                       Depends: libxcb-util-dev but it is not installable
                                       Depends: libxcb-xfixes0-dev but it is not installable
                                       Depends: libxcb-xinerama0-dev but it is not installable
                                       Depends: libxcb-xinput-dev but it is not installable
                                       Depends: libxcb-xkb-dev but it is not installable
                                       Depends: libxi-dev but it is not installable
                                       Depends: libxkbcommon-dev but it is not installable
                                       Depends: libxkbcommon-x11-dev but it is not installable
                                       Depends: libxrender-dev but it is not installable
                                       Depends: libzstd-dev but it is not installable
                                       Depends: unixodbc-dev but it is not installable
                                       Depends: zlib1g-dev but it is not installable
    E: Unable to correct problems, you have held broken packages.
    
    

    installing the dependencies manuall in small steps giving the same errors

    linux@linux-virtual-machine:~$ sudo apt install libxcb-glx0-dev
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Package libxcb-glx0-dev is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    
    E: Package 'libxcb-glx0-dev' has no installation candidate
    

    any idea what im doing wrong

    background im working on serveral applications under this linux using QtCreator etc. gcc, clang, cmake everything works, so i have no idea what is wrong with my system

    long-term goal is a TSAN build of Qt but first i want to get the vanialle build done and tested

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Axel Spoerl
      Moderators
      wrote on 4 Nov 2022, 07:38 last edited by
      #2

      The error message shouts it all out:

      This may mean that the package is missing, has been obsoleted, or
      is only available from another source

      Here it is: https://ubuntu.pkgs.org/22.04/ubuntu-main-amd64/libxcb-glx0-dev_1.14-3ubuntu3_amd64.deb.html

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      0
      • L Offline
        L Offline
        LowLevelM
        wrote on 4 Nov 2022, 11:00 last edited by
        #3

        but how to install libxcb-glx0-dev - i've tried to use the apt install as usual

        linux@linux-virtual-machine:~$ sudo apt install libxcb-glx0-dev
        [sudo] password for linux: 
        Reading package lists... Done
        Building dependency tree... Done
        Reading state information... Done
        Package libxcb-glx0-dev is not available, but is referred to by another package.
        This may mean that the package is missing, has been obsoleted, or
        is only available from another source
        
        E: Package 'libxcb-glx0-dev' has no installation candidate
        linux@linux-virtual-machine:~$ 
        
        J 1 Reply Last reply 4 Nov 2022, 11:06
        0
        • L LowLevelM
          4 Nov 2022, 11:00

          but how to install libxcb-glx0-dev - i've tried to use the apt install as usual

          linux@linux-virtual-machine:~$ sudo apt install libxcb-glx0-dev
          [sudo] password for linux: 
          Reading package lists... Done
          Building dependency tree... Done
          Reading state information... Done
          Package libxcb-glx0-dev is not available, but is referred to by another package.
          This may mean that the package is missing, has been obsoleted, or
          is only available from another source
          
          E: Package 'libxcb-glx0-dev' has no installation candidate
          linux@linux-virtual-machine:~$ 
          
          J Offline
          J Offline
          JonB
          wrote on 4 Nov 2022, 11:06 last edited by
          #4

          @LowLevelM
          You still seem to be trying to install it from the Ubuntu repo, where it apparently does not exist? All you have done here is repeat the command from earlier which errors, we have already seen that. That is presumably why @Axel-Spoerl gave you a link to download the .deb directly and install from that?

          1 Reply Last reply
          0
          • L Offline
            L Offline
            LowLevelM
            wrote on 4 Nov 2022, 11:12 last edited by LowLevelM 11 Apr 2022, 11:19
            #5

            i think i've solved it

            bbabec97-1d31-46d6-aef0-ca63d0c3cbc2-image.png

            the first and last from "Downloadable from the Internet" was missing
            now also "sudo apt-get build-dep qtbase5-dev" is working as expected

            @JonB
            Normally there is no need to download debs manually

            and yes i did a sudo apt update/upgrade etc. before

            J 1 Reply Last reply 4 Nov 2022, 11:24
            0
            • L LowLevelM
              4 Nov 2022, 11:12

              i think i've solved it

              bbabec97-1d31-46d6-aef0-ca63d0c3cbc2-image.png

              the first and last from "Downloadable from the Internet" was missing
              now also "sudo apt-get build-dep qtbase5-dev" is working as expected

              @JonB
              Normally there is no need to download debs manually

              and yes i did a sudo apt update/upgrade etc. before

              J Offline
              J Offline
              JonB
              wrote on 4 Nov 2022, 11:24 last edited by
              #6

              @LowLevelM said in Ubuntu 22.04, Qt5.15.x: can't sudo apt install many build dependency packages - how to solve?:

              Normally there is no need to download debs manually

              I know this, since I use Ubuntu :) But once in a while you have to fetch a .deb and install from that, if the package is missing from the standard repos. I had to do so recently for some package. I thought that was the case here, but I think you are saying you have found it with some settings. I never use the "Ubuntu Software" updater you show.

              L 1 Reply Last reply 4 Nov 2022, 11:38
              0
              • J JonB
                4 Nov 2022, 11:24

                @LowLevelM said in Ubuntu 22.04, Qt5.15.x: can't sudo apt install many build dependency packages - how to solve?:

                Normally there is no need to download debs manually

                I know this, since I use Ubuntu :) But once in a while you have to fetch a .deb and install from that, if the package is missing from the standard repos. I had to do so recently for some package. I thought that was the case here, but I think you are saying you have found it with some settings. I never use the "Ubuntu Software" updater you show.

                L Offline
                L Offline
                LowLevelM
                wrote on 4 Nov 2022, 11:38 last edited by
                #7

                @JonB said in Ubuntu 22.04, Qt5.15.x: can't sudo apt install many build dependency packages - how to solve?:

                I never use the "Ubuntu Software" updater you show.

                me too :)

                found that on https://wiki.qt.io/Building_Qt_5_from_Git

                Then you will need to enable the "Source code" option in Software and Updates > Ubuntu Software under the "Downloadable from the Internet" section. This setting can also be found by running software-properties-gtk.
                

                but that wasn't enough

                jsulmJ 1 Reply Last reply 4 Nov 2022, 11:41
                0
                • L LowLevelM
                  4 Nov 2022, 11:38

                  @JonB said in Ubuntu 22.04, Qt5.15.x: can't sudo apt install many build dependency packages - how to solve?:

                  I never use the "Ubuntu Software" updater you show.

                  me too :)

                  found that on https://wiki.qt.io/Building_Qt_5_from_Git

                  Then you will need to enable the "Source code" option in Software and Updates > Ubuntu Software under the "Downloadable from the Internet" section. This setting can also be found by running software-properties-gtk.
                  

                  but that wasn't enough

                  jsulmJ Online
                  jsulmJ Online
                  jsulm
                  Lifetime Qt Champion
                  wrote on 4 Nov 2022, 11:41 last edited by
                  #8

                  @LowLevelM said in Ubuntu 22.04, Qt5.15.x: can't sudo apt install many build dependency packages - how to solve?:

                  but that wasn't enough

                  You don't need source code repository to install libxcb-glx0-dev. The problem was that "main" repository was disabled for whatever reason.

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

                  L 1 Reply Last reply 4 Nov 2022, 13:45
                  2
                  • jsulmJ jsulm
                    4 Nov 2022, 11:41

                    @LowLevelM said in Ubuntu 22.04, Qt5.15.x: can't sudo apt install many build dependency packages - how to solve?:

                    but that wasn't enough

                    You don't need source code repository to install libxcb-glx0-dev. The problem was that "main" repository was disabled for whatever reason.

                    L Offline
                    L Offline
                    LowLevelM
                    wrote on 4 Nov 2022, 13:45 last edited by LowLevelM 11 Apr 2022, 13:45
                    #9

                    @jsulm

                    so the information about adding the source repo on https://wiki.qt.io/Building_Qt_5_from_Git is deprecated? or only not needed for libxcb-glx0-dev?

                    jsulmJ 1 Reply Last reply 7 Nov 2022, 07:15
                    0
                    • L Offline
                      L Offline
                      LowLevelM
                      wrote on 4 Nov 2022, 15:48 last edited by
                      #10

                      thanks all for your help - built Qt 5.15.7 from source and my cmake project is already using it :)

                      1 Reply Last reply
                      0
                      • L LowLevelM
                        4 Nov 2022, 13:45

                        @jsulm

                        so the information about adding the source repo on https://wiki.qt.io/Building_Qt_5_from_Git is deprecated? or only not needed for libxcb-glx0-dev?

                        jsulmJ Online
                        jsulmJ Online
                        jsulm
                        Lifetime Qt Champion
                        wrote on 7 Nov 2022, 07:15 last edited by
                        #11

                        @LowLevelM said in Ubuntu 22.04, Qt5.15.x: can't sudo apt install many build dependency packages - how to solve?:

                        so the information about adding the source repo on https://wiki.qt.io/Building_Qt_5_from_Git is deprecated?

                        Not necesserily. All I said is that to install libxcb-glx0-dev you do not need source repos...

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

                        1 Reply Last reply
                        0

                        1/11

                        2 Nov 2022, 12:02

                        • Login

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