Problem installing qtbase5-dev on Kubuntu 21.04

Asked by paultrotter88

On a fresh install of Kubuntu 21.04. Tried to install qtbase5-dev package. Here is the output I receive from apt:

paul@optiplex:~$ sudo apt install qtbase5-dev
[sudo] password for paul:
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:
 qtbase5-dev : Depends: libqt5concurrent5 (= 5.15.2+dfsg-5ubuntu1) but 5.15.2+dfsg-5 is to be installed
               Depends: libqt5core5a (= 5.15.2+dfsg-5ubuntu1) but 5.15.2+dfsg-5 is to be installed
               Depends: libqt5dbus5 (= 5.15.2+dfsg-5ubuntu1) but 5.15.2+dfsg-5 is to be installed
               Depends: libqt5gui5 (= 5.15.2+dfsg-5ubuntu1) but 5.15.2+dfsg-5 is to be installed
               Depends: libqt5network5 (= 5.15.2+dfsg-5ubuntu1) but 5.15.2+dfsg-5 is to be installed
               Depends: libqt5printsupport5 (= 5.15.2+dfsg-5ubuntu1) but 5.15.2+dfsg-5 is to be installed
               Depends: libqt5sql5 (= 5.15.2+dfsg-5ubuntu1) but 5.15.2+dfsg-5 is to be installed
               Depends: libqt5test5 (= 5.15.2+dfsg-5ubuntu1) but 5.15.2+dfsg-5 is to be installed
               Depends: libqt5widgets5 (= 5.15.2+dfsg-5ubuntu1) but 5.15.2+dfsg-5 is to be installed
               Depends: libqt5xml5 (= 5.15.2+dfsg-5ubuntu1) but 5.15.2+dfsg-5 is to be installed
               Recommends: libqt5opengl5-dev (= 5.15.2+dfsg-5ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

------------------------------------------------------------------

Here is the output of all commands requested from the PackageManagerTroubleshootingProcedure wiki page
https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure

paul@optiplex:~$ ubuntu-support-status || ubuntu-security-status
ubuntu-support-status: command not found
1878 packages installed, of which:
1246 receive package updates until 1/2022
paul@optiplex:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory
paul@optiplex:~$ dpkg --print-foreign-architectures
i386
paul@optiplex:~$ sudo grep -R roxy /etc/apt/*
[sudo] password for paul:
paul@optiplex:~$ grep roxy /etc/environment
paul@optiplex:~$ echo $http_proxy

paul@optiplex:~$ echo $ftp_proxy

paul@optiplex:~$ grep roxy /etc/bash.bashrc
paul@optiplex:~$ grep roxy ~/.bashrc
paul@optiplex:~$ cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
paul@optiplex:~$ sudo fuser -vvv /var/lib/dpkg/lock
paul@optiplex:~$ sudo fuser -vvv /var/cache/apt/archives/lock
paul@optiplex:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.04
DISTRIB_CODENAME=hirsute
DISTRIB_DESCRIPTION="Ubuntu 21.04"
paul@optiplex:~$ uname -a
Linux optiplex 5.11.0-18-generic #19-Ubuntu SMP Fri May 7 14:22:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
paul@optiplex:~$ sudo rm /var/lib/apt/lists/lock
paul@optiplex:~$ sudo rm /var/cache/apt/archives/lock

paul@optiplex:~$ sudo rm /var/lib/dpkg/lock
paul@optiplex:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
paul@optiplex:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
paul@optiplex:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status
paul@optiplex:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
paul@optiplex:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
cp: cannot stat '/var/lib/dpkg/available-old': No such file or directory
paul@optiplex:~$ sudo rm -rf /var/lib/dpkg/updates/*
paul@optiplex:~$ sudo rm -rf /var/lib/apt/lists
paul@optiplex:~$ sudo rm /var/cache/apt/*.bin
paul@optiplex:~$ sudo mkdir /var/lib/apt/lists
paul@optiplex:~$ sudo mkdir /var/lib/apt/lists/partial
paul@optiplex:~$ LANG=C;sudo apt-get clean
paul@optiplex:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
paul@optiplex:~$ sudo dpkg --configure -a
paul@optiplex:~$ sudo dpkg --clear-avail
paul@optiplex:~$ LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
paul@optiplex:~$ LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
paul@optiplex:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
paul@optiplex:~$ LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
Get:1 http://us.archive.ubuntu.com/ubuntu hirsute InRelease [269 kB]
Get:2 http://security.ubuntu.com/ubuntu hirsute-security InRelease [101 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu hirsute-updates InRelease [109 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu hirsute-backports InRelease [90.7 kB]
Get:5 http://security.ubuntu.com/ubuntu hirsute-security/main i386 Packages [56.3 kB]
Get:6 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 Packages [123 kB]
Get:7 http://security.ubuntu.com/ubuntu hirsute-security/main Translation-en [34.4 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu hirsute/main amd64 Packages [1394 kB]
Get:9 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 c-n-f Metadata [2172 B]
Get:10 http://security.ubuntu.com/ubuntu hirsute-security/restricted amd64 Packages [100 kB]
Get:11 http://security.ubuntu.com/ubuntu hirsute-security/restricted i386 Packages [16.9 kB]
Get:12 http://security.ubuntu.com/ubuntu hirsute-security/restricted Translation-en [14.4 kB]
Get:13 http://security.ubuntu.com/ubuntu hirsute-security/restricted amd64 c-n-f Metadata [472 B]
Get:14 http://security.ubuntu.com/ubuntu hirsute-security/universe amd64 Packages [190 kB]
Get:15 http://security.ubuntu.com/ubuntu hirsute-security/universe i386 Packages [174 kB]
Get:16 http://security.ubuntu.com/ubuntu hirsute-security/universe Translation-en [32.2 kB]
Get:17 http://security.ubuntu.com/ubuntu hirsute-security/universe amd64 DEP-11 Metadata [608 B]
Get:18 http://security.ubuntu.com/ubuntu hirsute-security/universe DEP-11 48x48 Icons [4031 B]
Get:19 http://security.ubuntu.com/ubuntu hirsute-security/universe DEP-11 64x64 Icons [29 B]
Get:20 http://security.ubuntu.com/ubuntu hirsute-security/universe DEP-11 64x64@2 Icons [29 B]
Get:21 http://security.ubuntu.com/ubuntu hirsute-security/universe DEP-11 128x128 Icons [29 B]
Get:22 http://security.ubuntu.com/ubuntu hirsute-security/universe amd64 c-n-f Metadata [4044 B]
Get:23 http://security.ubuntu.com/ubuntu hirsute-security/multiverse i386 Packages [1684 B]
Get:24 http://security.ubuntu.com/ubuntu hirsute-security/multiverse amd64 Packages [1692 B]
Get:25 http://security.ubuntu.com/ubuntu hirsute-security/multiverse Translation-en [432 B]
Get:26 http://security.ubuntu.com/ubuntu hirsute-security/multiverse amd64 c-n-f Metadata [116 B]
Get:27 http://us.archive.ubuntu.com/ubuntu hirsute/main i386 Packages [1025 kB]
Get:28 http://us.archive.ubuntu.com/ubuntu hirsute/main Translation-en [511 kB]
Get:29 http://us.archive.ubuntu.com/ubuntu hirsute/main amd64 DEP-11 Metadata [469 kB]
Get:30 http://us.archive.ubuntu.com/ubuntu hirsute/main DEP-11 48x48 Icons [102 kB]
Get:31 http://us.archive.ubuntu.com/ubuntu hirsute/main DEP-11 64x64 Icons [157 kB]
Get:32 http://us.archive.ubuntu.com/ubuntu hirsute/main DEP-11 64x64@2 Icons [15.8 kB]
Get:33 http://us.archive.ubuntu.com/ubuntu hirsute/main DEP-11 128x128 Icons [345 kB]
Get:34 http://us.archive.ubuntu.com/ubuntu hirsute/main amd64 c-n-f Metadata [29.5 kB]
Get:35 http://us.archive.ubuntu.com/ubuntu hirsute/restricted i386 Packages [20.3 kB]
Get:36 http://us.archive.ubuntu.com/ubuntu hirsute/restricted amd64 Packages [78.0 kB]
Get:37 http://us.archive.ubuntu.com/ubuntu hirsute/restricted Translation-en [12.0 kB]
Get:38 http://us.archive.ubuntu.com/ubuntu hirsute/restricted amd64 c-n-f Metadata [436 B]
Get:39 http://us.archive.ubuntu.com/ubuntu hirsute/universe i386 Packages [7087 kB]
Get:40 http://us.archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages [13.2 MB]
Get:41 http://us.archive.ubuntu.com/ubuntu hirsute/universe Translation-en [5441 kB]
Get:42 http://us.archive.ubuntu.com/ubuntu hirsute/universe amd64 DEP-11 Metadata [3848 kB]
Get:43 http://us.archive.ubuntu.com/ubuntu hirsute/universe DEP-11 48x48 Icons [3338 kB]
Get:44 http://us.archive.ubuntu.com/ubuntu hirsute/universe DEP-11 64x64 Icons [8115 kB]
Get:45 http://us.archive.ubuntu.com/ubuntu hirsute/universe DEP-11 64x64@2 Icons [57.1 kB]
Get:46 http://us.archive.ubuntu.com/ubuntu hirsute/universe DEP-11 128x128 Icons [14.6 MB]
Get:47 http://us.archive.ubuntu.com/ubuntu hirsute/universe amd64 c-n-f Metadata [279 kB]
Get:48 http://us.archive.ubuntu.com/ubuntu hirsute/multiverse i386 Packages [109 kB]
Get:49 http://us.archive.ubuntu.com/ubuntu hirsute/multiverse amd64 Packages [206 kB]
Get:50 http://us.archive.ubuntu.com/ubuntu hirsute/multiverse Translation-en [108 kB]
Get:51 http://us.archive.ubuntu.com/ubuntu hirsute/multiverse amd64 DEP-11 Metadata [47.3 kB]
Get:52 http://us.archive.ubuntu.com/ubuntu hirsute/multiverse DEP-11 48x48 Icons [29.6 kB]
Get:53 http://us.archive.ubuntu.com/ubuntu hirsute/multiverse DEP-11 64x64 Icons [198 kB]
Get:54 http://us.archive.ubuntu.com/ubuntu hirsute/multiverse DEP-11 64x64@2 Icons [214 B]
Get:55 http://us.archive.ubuntu.com/ubuntu hirsute/multiverse DEP-11 128x128 Icons [307 kB]
Get:56 http://us.archive.ubuntu.com/ubuntu hirsute/multiverse amd64 c-n-f Metadata [8124 B]
Get:57 http://us.archive.ubuntu.com/ubuntu hirsute-updates/main amd64 Packages [205 kB]
Get:58 http://us.archive.ubuntu.com/ubuntu hirsute-updates/main i386 Packages [114 kB]
Get:59 http://us.archive.ubuntu.com/ubuntu hirsute-updates/main Translation-en [56.6 kB]
Get:60 http://us.archive.ubuntu.com/ubuntu hirsute-updates/main amd64 DEP-11 Metadata [27.3 kB]
Get:61 http://us.archive.ubuntu.com/ubuntu hirsute-updates/main DEP-11 48x48 Icons [693 B]
Get:62 http://us.archive.ubuntu.com/ubuntu hirsute-updates/main DEP-11 64x64 Icons [678 B]
Get:63 http://us.archive.ubuntu.com/ubuntu hirsute-updates/main DEP-11 64x64@2 Icons [29 B]
Get:64 http://us.archive.ubuntu.com/ubuntu hirsute-updates/main DEP-11 128x128 Icons [1168 B]
Get:65 http://us.archive.ubuntu.com/ubuntu hirsute-updates/main amd64 c-n-f Metadata [4216 B]
Get:66 http://us.archive.ubuntu.com/ubuntu hirsute-updates/restricted amd64 Packages [100 kB]
Get:67 http://us.archive.ubuntu.com/ubuntu hirsute-updates/restricted i386 Packages [16.9 kB]
Get:68 http://us.archive.ubuntu.com/ubuntu hirsute-updates/restricted Translation-en [14.4 kB]
Get:69 http://us.archive.ubuntu.com/ubuntu hirsute-updates/restricted amd64 c-n-f Metadata [468 B]
Get:70 http://us.archive.ubuntu.com/ubuntu hirsute-updates/universe i386 Packages [198 kB]
Get:71 http://us.archive.ubuntu.com/ubuntu hirsute-updates/universe amd64 Packages [233 kB]
Get:72 http://us.archive.ubuntu.com/ubuntu hirsute-updates/universe Translation-en [47.1 kB]
Get:73 http://us.archive.ubuntu.com/ubuntu hirsute-updates/universe amd64 DEP-11 Metadata [612 B]
Get:74 http://us.archive.ubuntu.com/ubuntu hirsute-updates/universe DEP-11 48x48 Icons [4031 B]
Get:75 http://us.archive.ubuntu.com/ubuntu hirsute-updates/universe DEP-11 64x64 Icons [29 B]
Get:76 http://us.archive.ubuntu.com/ubuntu hirsute-updates/universe DEP-11 64x64@2 Icons [29 B]
Get:77 http://us.archive.ubuntu.com/ubuntu hirsute-updates/universe DEP-11 128x128 Icons [29 B]
Get:78 http://us.archive.ubuntu.com/ubuntu hirsute-updates/universe amd64 c-n-f Metadata [4820 B]
Get:79 http://us.archive.ubuntu.com/ubuntu hirsute-updates/multiverse i386 Packages [1684 B]
Get:80 http://us.archive.ubuntu.com/ubuntu hirsute-updates/multiverse amd64 Packages [3748 B]
Get:81 http://us.archive.ubuntu.com/ubuntu hirsute-updates/multiverse Translation-en [1012 B]
Get:82 http://us.archive.ubuntu.com/ubuntu hirsute-updates/multiverse amd64 c-n-f Metadata [244 B]
Get:83 http://us.archive.ubuntu.com/ubuntu hirsute-backports/main amd64 c-n-f Metadata [112 B]
Get:84 http://us.archive.ubuntu.com/ubuntu hirsute-backports/restricted amd64 c-n-f Metadata [120 B]
Get:85 http://us.archive.ubuntu.com/ubuntu hirsute-backports/universe amd64 c-n-f Metadata [116 B]
Get:86 http://us.archive.ubuntu.com/ubuntu hirsute-backports/multiverse amd64 c-n-f Metadata [120 B]
Fetched 63.4 MB in 9s (7374 kB/s)
Reading package lists... Done
paul@optiplex:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=100000000 && sudo apt-get dist-upgrade
Hit:1 http://us.archive.ubuntu.com/ubuntu hirsute InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu hirsute-updates InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu hirsute-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu hirsute-security InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
paul@optiplex:~$ find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

/etc/apt/sources.list

     1 #deb cdrom:[Kubuntu 21.04 _Hirsute Hippo_ - Release amd64 (20210420)]/ hirsute main multiverse restricted universe
     2
     3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     4 # newer versions of the distribution.
     5 deb http://us.archive.ubuntu.com/ubuntu/ hirsute main restricted
     6 # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute main restricted
     7
     8 ## Major bug fix updates produced after the final release of the
     9 ## distribution.
    10 deb http://us.archive.ubuntu.com/ubuntu/ hirsute-updates main restricted
    11 # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute-updates main restricted
    12
    13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    14 ## team. Also, please note that software in universe WILL NOT receive any
    15 ## review or updates from the Ubuntu security team.
    16 deb http://us.archive.ubuntu.com/ubuntu/ hirsute universe
    17 # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute universe
    18 deb http://us.archive.ubuntu.com/ubuntu/ hirsute-updates universe
    19 # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute-updates universe
    20
    21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    22 ## team, and may not be under a free licence. Please satisfy yourself as to
    23 ## your rights to use the software. Also, please note that software in
    24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    25 ## security team.
    26 deb http://us.archive.ubuntu.com/ubuntu/ hirsute multiverse
    27 # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute multiverse
    28 deb http://us.archive.ubuntu.com/ubuntu/ hirsute-updates multiverse
    29 # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute-updates multiverse
    30
    31 ## N.B. software from this repository may not have been tested as
    32 ## extensively as that contained in the main release, although it includes
    33 ## newer versions of some applications which may provide useful features.
    34 ## Also, please note that software in backports WILL NOT receive any review
    35 ## or updates from the Ubuntu security team.
    36 deb http://us.archive.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse
    37 # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse
    38
    39 ## Uncomment the following two lines to add software from Canonical's
    40 ## 'partner' repository.
    41 ## This software is not part of Ubuntu, but is offered by Canonical and the
    42 ## respective vendors as a service to Ubuntu users.
    43 # deb http://archive.canonical.com/ubuntu hirsute partner
    44 # deb-src http://archive.canonical.com/ubuntu hirsute partner
    45
    46 deb http://security.ubuntu.com/ubuntu hirsute-security main restricted
    47 # deb-src http://security.ubuntu.com/ubuntu hirsute-security main restricted
    48 deb http://security.ubuntu.com/ubuntu hirsute-security universe
    49 # deb-src http://security.ubuntu.com/ubuntu hirsute-security universe
    50 deb http://security.ubuntu.com/ubuntu hirsute-security multiverse
    51 # deb-src http://security.ubuntu.com/ubuntu hirsute-security multiverse
    52
    53 # This system was installed using small removable media
    54 # (e.g. netinst, live or single CD). The matching "deb cdrom"
    55 # entries were disabled at the end of the installation process.
    56 # For information about how to configure apt package sources,
    57 # see the sources.list(5) manual.
paul@optiplex:~$ sudo dpkg --audit

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

What is the output of the command

apt-cache policy qtbase5-dev libqt5concurrent5

Revision history for this message
paultrotter88 (paultrotter88) said :
#2

paul@optiplex:~$ sudo apt-cache policy qtbase5-dev libqt5concurrent5
[sudo] password for paul:
qtbase5-dev:
  Installed: (none)
  Candidate: 5.15.2+dfsg-5ubuntu1
  Version table:
     5.15.2+dfsg-5ubuntu1 500 (phased 40%)
        500 http://us.archive.ubuntu.com/ubuntu hirsute-updates/universe amd64 Packages
     5.15.2+dfsg-5 500
        500 http://us.archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
libqt5concurrent5:
  Installed: 5.15.2+dfsg-5
  Candidate: 5.15.2+dfsg-5
  Version table:
     5.15.2+dfsg-5ubuntu1 1 (phased 40%)
        500 http://us.archive.ubuntu.com/ubuntu hirsute-updates/universe amd64 Packages
 *** 5.15.2+dfsg-5 500
        500 http://us.archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#3

The problem seems to be the phased update.
To avoid that everybody installs a potentially defective package at the same time, there is a rollout schedule that in the first step only 10% of the users get the updated package, then another 10% and so on.

It is a bit strange to see that for libqt5concurrent5 apt sees version 5.15.2+dfsg-5 as the one that is suitable for you, but for qtbase5-dev the updated version 5.15.2+dfsg-5ubuntu1 is suggested.
This looks like a bug for me.

In any case the following command should work for you:

sudo apt install qtbase5-dev=5.15.2+dfsg-5

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

There is already a bug about this "phased upgrade" problem and work in progress for correction - Bug #1925745

Revision history for this message
paultrotter88 (paultrotter88) said :
#5

Thanks Manfred Hampl, that solved my question.

Revision history for this message
paultrotter88 (paultrotter88) said :
#6

For anyone who may be having this exact issue right now, it can be solved by referencing specific versions of the other qt packages:

sudo apt install qtbase5-dev=5.15.2+dfsg-5 qt5-qmake=5.15.2+dfsg-5 qtbase5-dev-tools=5.15.2+dfsg-5 qt5-qmake-bin=5.15.2+dfsg-5