The problem#
My personal desktop runs Debian Unstable ("Sid")1. The nature of running a bleeding edge distro is that things break sometimes. I use Debian Testing/Stable or Ubuntu on my other machines to make my life easier, but I often want access to the latest version of some piece of software and running Debian Unstable is one way to do that. Admittedly, I also do it partially just because fixing things that break is a good way of learning how things work.
The most common kind of problem I run into is that upgrades are not straightforward. For their unstable distro, Debian doesn't make any promises about package dependencies not changing. This is less of a problem when there's an additional package that needs to be installed, but can be complicated when there's conflicts which require removing packages to get an upgrade to go through.
Recently I ran into an extreme version of this problem: trying to
upgrade, it proposed uninstalling nearly everything I had installed.
Worse, trying to resolve the issue, I got a scary sounding warning that
I had uninstalled libssl3
:
dpkg: libssl3:amd64: dependency problems, but removing anyway as you requested:
[...]
systemd depends on libssl3 (>= 3.0.0).
sudo depends on libssl3 (>= 3.0.0).
[...]
Both of those sound important.
The solution#
Luckily, it wasn't as bad as it sounded. Looking at the message, it
turned out I had replaced libssl3
with libssl3t64
. The latter of
which is actually the exact same thing, although the package manager
doesn't know that. The reason for the different package name is part of
the Debian project to transition to 64-bit time_t
,
which is required to fix the Year 2038 problem. While on
AMD64 and other 64-bit architectures, everything already uses
64-bit time_t
, that's not true of all platforms that Debian supports.
The way Debian handles ABI transitions like this is to rename the
library packages with a suffix (t64
for this one) to ensure the old
and new ABI don't get mixed accidentally. Since all of the architectures
share the package names, the rename also happens on AMD64 even though
there's actual change to match the rename on other platforms where the
ABI did change.
Presumably the upgrade will be smoother when done
between stable versions, but it really confused apt
(which
I usually use via wajig
):
$ wajig install libssl-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:
libegl1 : Depends: libegl-mesa0 but it is not going to be installed
libreoffice-core : Depends: libgstreamer-plugins-base1.0-0 (>= 1.0.0) but it is not going to be installed
Depends: libgstreamer1.0-0 (>= 1.4.0) but it is not going to be installed
Depends: liborcus-0.18-0 (>= 0.19.2) but it is not going to be installed
Depends: liborcus-parser-0.18-0 (>= 0.19.2) but it is not going to be installed
wine-development : Depends: wine64-development (>= 8.21~repack-1) but it is not going to be installed or
wine32-development (>= 8.21~repack-1)
Depends: wine64-development (< 8.21~repack-1.1~) but it is not going to be installed or
wine32-development (< 8.21~repack-1.1~)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Yeah, no idea what libegl1
, libreoffice-core
, or wine-development
have to do with upgrading libssl-dev
, but apt
was showing those
same packages in the error messages no matter what I tried to upgrade
and trying to upgrade those packages didn't work either. Luckily,
aptitude
was able to handle it somewhat better:
$ sudo aptitude install libssl-dev
The following packages will be upgraded:
libssl-dev{b}
1 packages upgraded, 0 newly installed, 0 to remove and 1459 not upgraded.
Need to get 2,699 kB of archives. After unpacking 1,122 kB will be used.
The following packages have unmet dependencies:
libssl-dev : Depends: libssl3t64 (= 3.2.1-3) but it is not going to be installed
The following actions will resolve these dependencies:
Remove the following packages:
1) libssl3 [3.1.4-2 (now)]
2) libssl3:i386 [3.1.4-2 (now)]
Install the following packages:
3) libssl3t64 [3.2.1-3 (testing, unstable)]
4) libssl3t64:i386 [3.2.1-3 (testing, unstable)]
Accept this solution? [Y/n/q/?] y
The following NEW packages will be installed:
libssl3t64{a} libssl3t64:i386{a}
The following packages will be REMOVED:
libssl3{a} libssl3:i386{a}
The following packages will be upgraded:
libssl-dev
1 packages upgraded, 2 newly installed, 2 to remove and 1457 not upgraded.
Need to get 7,177 kB of archives. After unpacking 2,294 kB will be used.
Do you want to continue? [Y/n/?]
Getting the packages to upgrade involved a lot of calls to
aptitude
that looked like that: removing a list of libraries and a
installing a matching list of new libraries whose names were identical to
those removed except with t64
at the end.