Score:1

Can't install qtbase5-dev because of unmet dependencies

cn flag

When I try to install qtbase5-dev I have a problem with depencencies. What is the procedure to fix such a errors? Please, help newbie.

krzysiek@aps00090646-mb:~$ sudo apt install qtbase5-dev
Reading package lists... Done
Building dependency tree       
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:
 qtbase5-dev : Depends: libegl-dev but it is not going to be installed
               Depends: libgl-dev but it is not going to be installed
               Depends: libglu1-mesa-dev but it is not going to be installed or
                        libglu-dev
E: Unable to correct problems, you have held broken packages.

When I try manually install packages below I see:

krzysiek@aps00090646-mb:~$ sudo apt install libegl-dev 
Reading package lists... Done
Building dependency tree       
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:
 libegl-dev : Depends: libegl1 (= 1.3.1-1) but 1.3.2-1~ubuntu0.20.04.1 is to be installed
              Depends: libgl-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

My apt update:

krzysiek@aps00090646-mb:~$ sudo apt update
Hit:1 http://pl.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 https://download.virtualbox.org/virtualbox/debian focal InRelease                                                                                                                                      
Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease                                                                                                                                             
Hit:4 https://updates.signal.org/desktop/apt xenial InRelease                                                                                                           
Hit:5 https://repo.protonvpn.com/debian stable InRelease                                                                                         
Hit:6 https://packages.microsoft.com/repos/edge stable InRelease                           
Hit:7 https://packages.microsoft.com/repos/ms-teams stable InRelease 
Hit:8 https://esm.ubuntu.com/cis/ubuntu focal InRelease
Hit:9 https://esm.ubuntu.com/infra/ubuntu focal-infra-security InRelease
Hit:10 https://esm.ubuntu.com/infra/ubuntu focal-infra-updates InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

And when I try:

krzysiek@aps00090646-mb:~$ sudo apt install libegl1=1.3.1-1
Reading package lists... Done
Building dependency tree       
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:
 libegl1 : Depends: libglvnd0 (= 1.3.1-1) but 1.3.2-1~ubuntu0.20.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

Edit:

krzysiek@aps00090646-mb:~$ sudo apt install libglvnd0=1.3.1-1
Reading package lists... Done
Building dependency tree       
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:
 libqt5printsupport5 : Depends: libqt5gui5 (>= 5.11.0~rc1) but it is not going to be installed or
                                libqt5gui5-gles (>= 5.11.0~rc1) but it is not going to be installed
 libqt5widgets5 : Depends: libqt5gui5 (>= 5.12.5) but it is not going to be installed or
                           libqt5gui5-gles (>= 5.12.5) but it is not going to be installed
 libqt5x11extras5 : Depends: libqt5gui5 (>= 5.12.8+dfsg~) but it is not going to be installed or
                             libqt5gui5-gles (>= 5.12.8+dfsg~) but it is not going to be installed
 qt5-gtk-platformtheme : Depends: libqt5gui5 (>= 5.10.0) but it is not going to be installed or
                                  libqt5gui5-gles (>= 5.10.0) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Resolved: I unchecked from SystemUpdateGUI: Virtualbox, Microsoft Teams and Microsoft Edge repos. Next I made sudo apt update. And next:

krzysiek@aps00090646-mb:~$ sudo apt install qtbase5-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libegl-dev libgl-dev libglu1-mesa-dev libglx-dev libpthread-stubs0-dev libqt5opengl5-dev
  libqt5sql5 libqt5sql5-sqlite libqt5test5 libqt5xml5 libvulkan-dev libx11-dev libxau-dev
  libxcb1-dev libxdmcp-dev libxext-dev qtbase5-dev-tools x11proto-core-dev x11proto-dev
  x11proto-xext-dev xorg-sgml-doctools xtrans-dev
Suggested packages:
  libx11-doc libxcb-doc libxext-doc default-libmysqlclient-dev firebird-dev libpq-dev libsqlite3-dev
  unixodbc-dev
The following NEW packages will be installed:
  libegl-dev libgl-dev libglu1-mesa-dev libglx-dev libpthread-stubs0-dev libqt5opengl5-dev
  libqt5sql5 libqt5sql5-sqlite libqt5test5 libqt5xml5 libvulkan-dev libx11-dev libxau-dev
  libxcb1-dev libxdmcp-dev libxext-dev qtbase5-dev qtbase5-dev-tools x11proto-core-dev x11proto-dev
  x11proto-xext-dev xorg-sgml-doctools xtrans-dev
0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.
Need to get 4485 kB of archives.
After this operation, 35.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Someone avatar
my flag
Please post the output of `sudo apt update`. Also, run the command `sudo apt install libegl1=1.3.1-1` and tell if the situation is better.
cn flag
Unfortunately :( Terminal output pasted above
Someone avatar
my flag
Run `sudo apt install libglvnd0=1.3.1-1` also tell why are you trying to install QTbase5-dev?
cn flag
Pasted. I need qtbase5-dev because i must install Aruba clearpass-onguard tool. My job req.
Someone avatar
my flag
I see... Maybe there are alternatives to install it or even alternatives to it? There are many dependency issues in your system further and further.
Johan Palych avatar
us flag
sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* && sudo apt update
Someone avatar
my flag
@JohanPalych That won't help in every case. At least, not in this case.
cn flag
@JohanPalych Sorry bro - I tried to avoid such risked tampering with system files.
cn flag
@Someone I succesfully installed now clearpass aruba without qtbase5-dev such they wrote in procedure. Maybe it is redundant step? "INSTALLATION PROCEDURE: 1) Ensure that the following Qt5 packages are installed on the system: qt5-qtbase, qt5-qtbase-gui, and qt5-qtbase-common."
Someone avatar
my flag
Congratulations on solving your issue! :D
cn flag
@Someone Thnx You were with me :)
Johan Palych avatar
us flag
Sorry, bro, I checked it on a virtual machine. It installs perfectly. apt-cache policy qtbase5-dev (5.12.8+dfsg-0ubuntu2.1 focal-updates/universe)
cn flag
Thank You @JohanPalych Yes, I can confirm that. Something is installed on my machine caused that issue. But I have only "peace" of Ubuntu packages installed. Almost all are from official repos.
Johan Palych avatar
us flag
For repairing broken packages: sudo apt-get update --fix-missing && sudo apt-get install -f More serious: sudo dpkg --configure -a && sudo apt-get clean && sudo apt-get update https://help.ubuntu.com/community/Repositories/Ubuntu In Italian(unfortunately) https://wiki.ubuntu-it.org/Repository/SourcesList
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.