9

I am trying to upgrade from Ubuntu 18.04.5 to 20.04.1 via:

$ sudo do-release-upgrade

This fails as follows:

...

Could not calculate the upgrade

An unresolvable problem occurred while calculating the upgrade.

This was likely caused by:
Unofficial software packages not provided by Ubuntu Please use the tool 'ppa-purge' from the ppa-purge package to remove software from a Launchpad PPA and try the upgrade again.

If none of this applies, then please report this bug using the command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal. If you want to investigate this yourself the log files in '/var/log/dist-upgrade' will contain details about the upgrade. Specifically, look at 'main.log' and 'apt.log'.

The tail of /var/log/dist-upgrade/main.log contains the following error:

...
2020-10-11 18:36:30,320 WARNING Can't mark 'ubuntu-desktop' for upgrade (E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.)
2020-10-11 18:36:31,747 ERROR Dist-upgrade failed: 'Broken packages after upgrade: colord'
2020-10-11 18:36:31,747 DEBUG abort called
2020-10-11 18:36:31,755 DEBUG openCache()
2020-10-11 18:36:37,070 DEBUG Comparing 4.15.0-117 with 
2020-10-11 18:36:37,071 DEBUG Comparing 4.15.0-118 with 4.15.0-117
2020-10-11 18:36:37,824 DEBUG /openCache(), new cache size 99980

Here are the reverse package dependencies of colord:

$ apt-cache rdepends colord
colord
Reverse Depends:
  colord-sensor-argyll
  gnome-control-center
    colord:i386
  cups-filters
    colord:i386
  cups-daemon
    colord:i386
  cups
    colord:i386
  xiccd
    colord:i386
  krita
    colord:i386
  gnome-color-manager
    colord:i386
  foomatic-filters
    colord:i386
  dispcalgui
    colord:i386
  diffoscope
    colord:i386
  colord-sensor-argyll
    colord:i386
  colord-sensor-argyll
  colord-data
  colord-sensor-argyll
    colord:i386
  argyll
    colord:i386
  libcolord2
    colord:i386
  libcolord-gtk1
    colord:i386
  gnome-control-center
    colord:i386
  cups-filters
    colord:i386
  cups-daemon
    colord:i386
  cups
    colord:i386
  colord-data

I recently had a segmentation fault issue with mesa and installed a version from ppa:kisak/kisak-mesa. This might cause the upgrade problem now.

The following would happen if I remove the colord package:

$ sudo apt-get remove colord 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apg colord-data gnome-control-center-faces gnome-online-accounts libcolorhug2 libnss-myhostname linux-headers-4.15.0-117 linux-headers-4.15.0-117-generic
  linux-image-4.15.0-117-generic linux-modules-4.15.0-117-generic linux-modules-extra-4.15.0-117-generic python3-macaroonbakery python3-nacl
  python3-protobuf python3-pymacaroons python3-rfc3339 ubuntu-system-service
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  colord gnome-control-center ubuntu-desktop
0 upgraded, 0 newly installed, 3 to remove and 8 not upgraded.
After this operation, 5,782 kB disk space will be freed.
Do you want to continue? [Y/n]

This does not sound like a good idea because last time I removed ubuntu-desktop the UI did no longer start-up. See linked post.

Question

How can I resolve the upgrade problem without risking the segmentation fault to reincarnate?

Related

JJD
  • 862
  • Have you tried removing the broken package? – Nate Oct 13 '20 at 19:44
  • 1
    No, I have not. I fear that it will remove it dependencies with it and the UI will no longer start up as it happened in the linked issue. – JJD Oct 13 '20 at 20:50
  • maybe this can help you https://askubuntu.com/questions/110477/how-do-i-upgrade-to-a-newer-version-of-ubuntu – s1mmel Oct 14 '20 at 08:33
  • 1
    you need to remove all ppa's and update all ubuntu packages to the latest version, then you can move on to change the release. Remove the ppa's, try to update apt without them. If you are lucky, the problem is gone. – s1mmel Oct 14 '20 at 19:21
  • I unckecked all PPAs and updated all packages to the latest version. Still the mentioned package blocks the upgrade. Please have a look at the linked issue to understand why I installed it. – JJD Oct 14 '20 at 19:49
  • How can dependent packages still function if I remove the one package which blocks the upgrade? – JJD Oct 14 '20 at 19:51
  • you can try to upgrade with debian way. your mesa ppa offers packages for focal too. But first off all make a backup :D – nobody Oct 15 '20 at 19:34
  • @nobody Can you please describe the exact steps? The question is whether the focal mesa package is newer then the PPA mesa package I have currently installed aka. does not cause the segmentation fault. – JJD Oct 15 '20 at 19:41
  • that we do better in chat. For security there have to be some simulations. Maybe a mod ist so kind and open one – nobody Oct 15 '20 at 19:44
  • Did you try sudo apt-get install --reinstall colord? I'd also give sudo aptitude -f install a try. What does sudo dpkg-reconfigure colord tell you? – starkus Oct 17 '20 at 10:26
  • 1
    The proper way is to remove the ppa and the installed mesa, then do the upgrade from the command line, segfault or not, reinstall mesa, reboot. After that, you can test your new 20.04.1 where the issue should be gone. Cannot say exactly since running 20.10 already with Mesa 20.2.1 and OpenGL 3.0 here. – emk2203 Oct 17 '20 at 10:26
  • 1
    grep -r deb /etc/apt/sources.list /etc/apt/sources.list.d please. Need to know if other ppa's were bound in. – nobody Oct 17 '20 at 10:31
  • @nobody As requested the output of the grep command. I unchecked all external PPAs earlier. – JJD Oct 17 '20 at 16:16
  • @emk2203 Do you mean I should remove colord and mesa-utils and immediately run the upgrade without rebooting in between and then hoping that the new Ubuntu version when starting up no longer installs a buggy version of the package? – JJD Oct 17 '20 at 16:27
  • @starkus The output of sudo dpkg-reconfigure colord is colord.service is a disabled or a static unit, not starting it.. – JJD Oct 17 '20 at 16:29
  • 1
    @nobody Sorry, I already started the upgrade by uninstalling colord and mesa-utils and its dependencies before. It is running right now. I will let you know how it turned out. – JJD Oct 17 '20 at 18:31
  • I am looking forward to you posting the result. Yes, this is what I meant - borne out of experience in other cases. When the package manager has issues, it's often catastrophic to reboot in between the fixes. – emk2203 Oct 17 '20 at 18:54
  • 1
    Upgrade done. As stated I removed colord and mesa-utils, started the upgrade. It went well. Then System Settings and desktop icons were missing which ended up that I completely removed mesa packages (from the PPA) via Synaptic Package Manager and then installed gnome-control-center cleanly which also installed mesa packages. Now the system seems fine. - Thanks everybody for the hints. I am not sure how to handle the bounty. I probably post my own answer (?) – JJD Oct 17 '20 at 20:07
  • 1
    Please do. You did the work for it anyway. – emk2203 Oct 18 '20 at 10:49

2 Answers2

6

After all helpful hints, questions and comments I became inpatient with myself and decided to give the upgrade another try. Here is what I did:

  1. sudo apt-get remove colord
  2. sudo apt-get remove mesa-utils - This also removed ubuntu-desktop

This unblocked the do-release-upgrade command. No reboot at this step.

  1. sudo do-release-upgrade

After ~2h of downloading the upgrade process requested a reboot. I confirmed. The upgrade went well - the system started.
After inspecting the new operating system I noticed that I could neither open the Settings nor change the background image nor could I install ubuntu-desktop or gnome-control-center. Also no files where shown on the Desktop although I could ls them in the folder.
After a while I figured that these packages where still blocked by some mesa packages originating from ppa:kisak/kisak-mesa.

  1. I decided to completely remove all mesa package via Synaptic Package Manager
  2. sudo apt-get install gnome-control-center which transitively installed mesa packages
  3. sudo apt-get install ubuntu-desktop
  4. Reboot.

After restarting the system all files on the Desktop where shown, I was able to launch the Settings and change the background image. - Thank you everyone!

JJD
  • 862
  • 4
    It's best to first roll back what the ppa did. For this, you need ppa-purge. Install it BEFORE you have problems with the package manager. It's 25 kB and I always have it installed. Then, you can run sudo ppa-purge ppa:kisak/kisak-mesa, you can do step 1, ubuntu-desktop should still be there. Then 3, reboot, done. – emk2203 Oct 19 '20 at 07:45
  • Although I had a different set of package issues that started with evolution-data-server instead of mesa-utils, this process solved the problem exactly as described. I also had the stuck ubuntu-desktop in my log files, but it wasn't removed with the apt-get remove. – Bill Armstrong Nov 04 '22 at 04:49
1

For people who need it: sudo apt-get update --fix-missing; sudo dpkg --configure -a; sudo apt-get install -f; sudo fuser -vki /var/lib/dpkg/lock; sudo dpkg --configure -a;

Ravexina
  • 55,668
  • 25
  • 164
  • 183
Vasilisa
  • 579
  • 2
  • 15
  • 1
    I hereby confirm that I tried your commands but they did not help me so far. Nevertheless, I appreciate your post. – JJD Oct 13 '20 at 20:51
  • if you remove the broken package like mentioned in another above comment, it shouldn't ideally remove dependencies unless you run a purge command or run sudo apt autoremove after.. not sure about why it is seg faulting though :/ – Vasilisa Oct 14 '20 at 11:34