4

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?

  • How did you try to upgrade? Officially the upgrade window opens when the 20.04.1 version is released. Did you follow some external guide, and if so, which? – Kurankat Apr 24 '20 at 23:24
  • Using "sudo do-release-upgrade -d". I have 2 computers runnning ubuntu and on my 18.04 laptop, it worked fine (after dealing with wine dependencies). – Magnus Tremain Apr 25 '20 at 06:11
  • 1
    i had the same issue, follow this solution https://askubuntu.com/a/1185290/11027 – Laurent Debricon Apr 25 '20 at 11:30
  • Unfortunately that didn't work either, but thanks for the suggestion. Libgl-mesa-dri was installed and the initial suggestion didn't update any packages. – Magnus Tremain Apr 25 '20 at 17:53
  • @MagnusTremain, development versions aren't supported and considered off-topic here. I know 20.04 is no longer a development version, but using do-release-upgrade -d upgrades to the development version, and it's hard to know whether your problem was a bug that has now been fixed. – Kurankat Apr 26 '20 at 00:06
  • @Kurankat Ok. Then i guess this can be considered closed. Disappointing thought that this feels like a bit of a marketing stunt, because what's the point of a "launch" if your old users can't use what you launched without a complete reinstall? – Magnus Tremain Apr 27 '20 at 03:43

2 Answers2

9

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,268
  • 1
  • 48
  • 59
  • Thanks for the reply however it seems to break here

    dpkg: libsensors5:amd64: dependency problems, but configuring anyway as you requested: libsensors5:amd64 depends on libc6 (>= 2.29); however: Version of libc6:amd64 on system is 2.27-3ubuntu1.2.

    When i do fix broken install it practically removes these 2 packages.

    – Magnus Tremain Oct 04 '20 at 13:54
  • 1
    @MagnusTremain First, make sure that all additional Ubuntu repositories in /etc/apt/sources.list are reactivated with focal as the target release. Continue with a sudo apt update, followed by a sudo apt upgrade before trying to resolve the libsensors5 problem. – Serge Stroobandt Oct 04 '20 at 17:02
  • does that mean that i have to manually add all the focal repos? Because everything in there is on "bionic" at the moment. Thanks. – Magnus Tremain Oct 05 '20 at 08:32
  • 1
    @MagnusTremain After a do-release-upgrade to 20.04, I have noticed they will already be configured for focal. However, you will need to manually enable them again in the Repositories section of the Software Updater or the Synaptic Package Manager. After that, proceed with an update and an upgrade. – Serge Stroobandt Oct 05 '20 at 11:21
  • 1
    Thanks for the help. Actually, after fiddling some more, in my case, this was caused by a PPA that i used to install a mesa driver but had removed at some point making it impossible to properly fix broken install. Readded the PPA, removed it, downgraded to "normal" packages and it went smoothly from there. – Magnus Tremain Oct 05 '20 at 11:56