Ubuntu 22.04, Qt5.15.x: can't sudo apt install many build dependency packages - how to solve?
-
wrote on 2 Nov 2022, 12:02 last edited by LowLevelM 11 Mar 2022, 08:01
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 installablelinux@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
-
The error message shouts it all out:
This may mean that the package is missing, has been obsoleted, or
is only available from another sourceHere it is: https://ubuntu.pkgs.org/22.04/ubuntu-main-amd64/libxcb-glx0-dev_1.14-3ubuntu3_amd64.deb.html
-
wrote on 4 Nov 2022, 11:00 last edited by
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:~$
-
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:~$
wrote on 4 Nov 2022, 11:06 last edited by@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? -
wrote on 4 Nov 2022, 11:12 last edited by LowLevelM 11 Apr 2022, 11:19
i think i've solved it
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 manuallyand yes i did a sudo apt update/upgrade etc. before
-
i think i've solved it
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 manuallyand yes i did a sudo apt update/upgrade etc. before
wrote on 4 Nov 2022, 11:24 last edited by@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. -
@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.wrote on 4 Nov 2022, 11:38 last edited by@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
-
@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
@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.
-
@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.
wrote on 4 Nov 2022, 13:45 last edited by LowLevelM 11 Apr 2022, 13:45so 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?
-
wrote on 4 Nov 2022, 15:48 last edited by
thanks all for your help - built Qt 5.15.7 from source and my cmake project is already using it :)
-
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?
@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...
1/11