I just tried upgrading from Ubuntu 18.04 to 20.04. The upgrade seems to have been successful. However, I cannot get away with dependency problems with libsensors4
.
Running sudo apt upgrade
yields:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libgl1-mesa-dri : Depends: libsensors4 (>= 1:3.0.0) but it is not installable
lm-sensors : Depends: libsensors4 (>= 1:3.1.1) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
And sudo apt --fix-broken install
yields:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libgl1-mesa-dri : Depends: libsensors4 (>= 1:3.0.0) but it is not installable
lm-sensors : Depends: libsensors4 (>= 1:3.1.1) but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
I have tried installing libsensors4
, but I got:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libsensors4 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
However the following packages replace it:
libsensors4:i386 libsensors-config
E: Package 'libsensors4' has no installation candidate
Running sudo apt list libgl1-mesa-dri
yields:
Listing... Done
libgl1-mesa-dri/now 1:20.0~git200108124800.ad4fb7e~b~padoka0 amd64 [installed,local]
libgl1-mesa-dri/focal-updates,focal-security 21.2.6-0ubuntu0.1~20.04.2 i386
I cannot install anything through apt anymore. I saw related problems appearing in several other questions, but for some reason none of the answers allowed me to solve the problem. Thanks in advance for your help, would be happy to provide more info if required!
Edit
The output of apt-cache rdepends lm-sensors
is
lm-sensors
Reverse Depends:
libsensors-config
libsensors4
inxi
libsensors5
libsensors-config
libsensors5
and the output of apt-cache rdepends libgl1-mesa-dri
is
libgl1-mesa-dri
Reverse Depends:
qml-module-qtquick2
libwine
libglx-mesa0
xserver-xorg-video-nouveau
xserver-xorg-core
xserver-xorg-core
xserver-xephyr
libwebkit2gtk-4.0-37
libglx-mesa0
xserver-xorg-core
xserver-xorg-core
xserver-xephyr
xserver-xorg
libglx-mesa0
xorg
libwebkit2gtk-4.0-37
Finally, here is the output of sudo dpkg -l | grep '^.[^i]'
: https://pastebin.com/2zyg4mHB
libsensors4
was superseded bylibsensors5
. Newer packages do not depend upon older wrong-version packages. This looks like a classic symptom of an unsuccessful release-upgrade. – user535733 Oct 16 '23 at 01:24apt-cache rdepends lm-sensors
andapt-cache rdepends libgl1-mesa-dri
. – rusty Oct 16 '23 at 01:52sudo dpkg -l | grep '^.[^i]'
. – rusty Oct 16 '23 at 02:32sudo dpkg --configure -a
followed bysudo apt install --fix-broken
work. – rusty Oct 17 '23 at 01:49xfce4-volumed
package in the list, does that mean you are using Xubuntu. In that case is the applicationSynaptic Package Manager
available in your computer? If yes, solving the broken package problem is much easier. – rusty Oct 18 '23 at 01:06