3

I tried to upgrade from 18.04 to 20.04 however there are some held back packages that seem to be blocking me and i don't really understand how to fix them properly. The log file says

2020-04-24 17:38:44,134 ERROR Dist-upgrade failed: 'Broken packages after upgrade: colord'

Checking the apt.log as the instructions mention i see a few with errors

Broken colord:amd64 Depends on libsane:amd64 < none | 1.0.29-0ubuntu5 @un umH > (>= 1.0.24)
  Considering libsane:amd64 15 as a solution to colord:amd64 37
  Added libsane:amd64 to the remove list
  Fixing colord:amd64 via keep of libsane:amd64

Broken libsensors-config:amd64 Conflicts on libsensors4:amd64 < 1:3.4.0-4 @ii gK >
  Considering libsensors4:amd64 34 as a solution to libsensors-config:amd64 1
  MarkKeep libsensors-config:amd64 < none -> 1:3.6.0-2ubuntu1 @un umN Ib > FU=0
  Holding Back libsensors-config:amd64 rather than change libsensors4:amd64

Investigating (3) libsensors5:amd64 < none -> 1:3.6.0-2ubuntu1 @un umN Ib >
Broken libsensors5:amd64 Depends on libsensors-config:amd64 < none | 1:3.6.0-2ubuntu1 @un umH >
  Considering libsensors-config:amd64 1 as a solution to libsensors5:amd64 2
  MarkKeep libsensors5:amd64 < none -> 1:3.6.0-2ubuntu1 @un umN Ib > FU=0
  Holding Back libsensors5:amd64 rather than change libsensors-config:amd64

Investigating (3) lm-sensors:amd64 < 1:3.4.0-4 -> 1:3.6.0-2ubuntu1 @ii umU Ib >
Broken lm-sensors:amd64 Depends on libsensors5:amd64 < none | 1:3.6.0-2ubuntu1 @un umH > (>= 1:3.5.0)
  Considering libsensors5:amd64 2 as a solution to lm-sensors:amd64 0
  MarkKeep lm-sensors:amd64 < 1:3.4.0-4 -> 1:3.6.0-2ubuntu1 @ii umU Ib > FU=0
  Holding Back lm-sensors:amd64 rather than change libsensors5:amd64

Investigating (4) libsnmp35:amd64 < none -> 5.8+dfsg-2ubuntu2 @un umN Ib >
Broken libsnmp35:amd64 Depends on libsensors5:amd64 < none | 1:3.6.0-2ubuntu1 @un umH > (>= 1:3.5.0)
  Considering libsensors5:amd64 2 as a solution to libsnmp35:amd64 7
  MarkKeep libsnmp35:amd64 < none -> 5.8+dfsg-2ubuntu2 @un umN Ib > FU=0
  Holding Back libsnmp35:amd64 rather than change libsensors5:amd64
 Try to Re-Instate (4) lm-sensors:amd64
  MarkKeep lm-sensors:amd64 < 1:3.4.0-4 -> 1:3.6.0-2ubuntu1 @ii umU Ib > FU=0

Investigating (5) libsane:amd64 < none -> 1.0.29-0ubuntu5 @un umN Ib >
Broken libsane:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2 @un umH > (>= 5.8+dfsg)
  Considering libsnmp35:amd64 7 as a solution to libsane:amd64 15
  MarkKeep libsane:amd64 < none -> 1.0.29-0ubuntu5 @un umN Ib > FU=0
  Holding Back libsane:amd64 rather than change libsnmp35:amd64

There are some more errors but they seem to be coming back to these same ones. I tried to update/upgrade, fix broken packages, there is nothing to be done according to the feedback.

Does anyone have any ideas?

2 Answers2

10

After an aborted, almost complete, upgrade, I had a very similar problem. I have libsensors4 installed, and if I tried to remove it or install libsensors5, a huge number of other packages get removed.

The problem is that my libgl1-mesa-dri depends on libsensors4, as seen here:

$ apt-cache rdepends libsensors4
libsensors4
Reverse Depends:
  lm-sensors
  sysstat
  libgl1-mesa-dri
  libsensors-config
  libsensors-config

This package is not from the official Ubuntu package repository, but from a ppa kisak/kisak-mesa. You can see it in its version string 20.0.7~kisak1~b -- the problem is also that this is a higher version than the Ubuntu one:

$ sudo apt list   libgl1-mesa-dri
Listing... Done
libgl1-mesa-dri/now 20.0.7~kisak1~b amd64 [installed,local]
libgl1-mesa-dri/focal 20.0.4-2ubuntu1 i386 [residual-config]

So my solution (below) is to get rid of packages from this PPA. If you have similar outputs on the commands above, try the following to purge the PPA:

$ sudo ppa-purge -o kisak  -p kisak-mesa
Updating packages lists
PPA to be removed: kisak kisak-mesa
Warning:  Could not find package list for PPA: kisak kisak-mesa

If you can't purge it, like seen above, first add the PPA, then purge it again. If it's another PPA blocking you, replace the name in the command below.

$ sudo add-apt-repository ppa:kisak/kisak-mesa
[...]
$ sudo ppa-purge -o kisak  -p kisak-mesa
[...]
Suggested packages:
  lm-sensors
The following packages will be REMOVED:
  libsensors4
The following NEW packages will be installed:
  libllvm9:i386 libsensors-config libsensors5
The following packages will be DOWNGRADED:
  libegl-mesa0 libegl1-mesa libegl1-mesa-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglapi-mesa:i386 libglx-mesa0
  libosmesa6 libosmesa6:i386 mesa-opencl-icd mesa-va-drivers mesa-vdpau-drivers mesa-vulkan-drivers mesa-vulkan-drivers:i386

Now the PPA is gone and apt will work better. Finally make sure you have all the desktop packages installed:

$ sudo apt install ubuntu-desktop
1

On Ubuntu 20.04.1 LTS

Download the packages libsensors5 and libsensors-config manually from the official Ubuntu repository and force their installation:

$ wget http://archive.ubuntu.com/ubuntu/pool/main/l/lm-sensors/libsensors5_3.6.0-2ubuntu1_amd64.deb
$ wget http://archive.ubuntu.com/ubuntu/pool/main/l/lm-sensors/libsensors-config_3.6.0-2ubuntu1_all.deb
$ sudo dpkg -i --force-all libsensors5_3.6.0-2ubuntu1_amd64.deb libsensors-config_3.6.0-2ubuntu1_all.deb

The last command results in the following output:

Selecting previously unselected package libsensors5:amd64.
(Reading database ... 655733 files and directories currently installed.)
Preparing to unpack libsensors5_3.6.0-2ubuntu1_amd64.deb ...
Unpacking libsensors5:amd64 (1:3.6.0-2ubuntu1) ...
Selecting previously unselected package libsensors-config.
dpkg: considering removing libsensors4:amd64 in favour of libsensors-config ...
dpkg: warning: ignoring dependency problem with removal of libsensors4:amd64:
 lm-sensors depends on libsensors4 (>= 1:3.1.1)
  libsensors4:amd64 is to be removed.

dpkg: warning: ignoring dependency problem with removal of libsensors4:amd64: libgl1-mesa-dri:amd64 depends on libsensors4 (>= 1:3.0.0) libsensors4:amd64 is to be removed.

dpkg: yes, will remove libsensors4:amd64 in favour of libsensors-config Preparing to unpack libsensors-config_3.6.0-2ubuntu1_all.deb ... Unpacking libsensors-config (1:3.6.0-2ubuntu1) ... Setting up libsensors-config (1:3.6.0-2ubuntu1) ... Installing new version of config file /etc/sensors3.conf ... Setting up libsensors5:amd64 (1:3.6.0-2ubuntu1) ... Processing triggers for libc-bin (2.31-0ubuntu9.1) ...

Finish off with:

$ sudo apt --fix-broken install

Resulting in:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libegl-mesa0 libgbm1 libgl1-mesa-dri libglapi-mesa libglx-mesa0 libosmesa6 lm-sensors
Suggested packages:
  fancontrol read-edid i2c-tools
The following packages will be upgraded:
  libegl-mesa0 libgbm1 libgl1-mesa-dri libglapi-mesa libglx-mesa0 libosmesa6 lm-sensors
7 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.
Need to get 12.5 MB of archives.
After this operation, 24.0 MB of additional disk space will be used.
Serge Stroobandt
  • 5,719
  • 1
  • 54
  • 59