do-release-upgrade fails when upgrading to 22.04 "An unresolvable problem occurred"

Asked by Luca Hermes

I'm trying to upgrade my system from Ubuntu version 20.04 to 22.04 via `do-release-upgrade`. The command fails with "An unresolvable problem occurred while calculating the upgrade."

I did some research and found that external software sources may be the issue, but I can't figure out which ones are causing the issue for me. Any help is greatly appreciated.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: ubuntu-release-upgrader-core 1:20.04.40
ProcVersionSignature: Ubuntu 5.4.0-144.161-generic 5.4.229
Uname: Linux 5.4.0-144-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.25
Architecture: amd64
CasperMD5CheckResult: skip
CrashDB: ubuntu
CurrentDesktop: Unity:Unity7:ubuntu
Date: Thu Mar 9 16:37:02 2023
InstallationDate: Installed on 2017-06-11 (2096 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
PackageArchitecture: all
SourcePackage: ubuntu-release-upgrader
UpgradeStatus: Upgraded to focal on 2023-03-09 (0 days ago)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ubuntu-release-upgrader Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Luca Hermes (lucahermes) said :
#1

I found several hints that this should be posted as a question - I am unsure that this is a bug

Revision history for this message
Bernard Stafford (bernard010) said :
#2

First use : sudo apt update && sudo apt upgrade -y
then : sudo reboot
To update your computer.
https://itsfoss.com/upgrade-ubuntu-version/

Revision history for this message
Luca Hermes (lucahermes) said :
#3

Thanks so much for taking the time to look into this.
I updated all my packages prior to the release update already. To be sure I did it again and rebooted, but it's still the same issure

Revision history for this message
Bernard Stafford (bernard010) said (last edit ):
#4

Try using the GUI to upgrade.
If you have any PPAs installed remove them before upgrading.

Revision history for this message
Luca Hermes (lucahermes) said :
#5

I just did and it terminated at the same point as the cli (Calculating changes).
Now the /etc/apt/sources.list file contains ubuntu jammy repos instead of the focal repos, so I guess the GUI version didn't revert to original system state - I should probably not upgrade from this manually but rather revert to the original sources before trying anything else, right? (https://gist.github.com/ishad0w/788555191c7037e249a439542c53e170)

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

I suggest the following:

Revert the /etc/apt/sources.list configuration file to 20.04 (focal).

Then run the commands

sudo apt update
apt --simulate remove python-gi

and copy/paste all output that we can check.

Revision history for this message
Luca Hermes (lucahermes) said :
#7

Thanks to you too for looking into this,
I reverted the sources back. My sources.list file is now exactly the one I linked to on Github.
This is the output of the commands:

$ sudo apt update
Hit:1 http://archive.canonical.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

$ apt --simulate remove python-gi
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  python-gi python-gi-cairo
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Remv python-gi-cairo [3.36.0-1]
Remv python-gi [3.36.0-1]

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

The main.log in your bug report shows

2023-03-09 16:36:39,364 DEBUG none of the '['ubuntu-desktop', 'kubuntu-desktop', 'xubuntu-core', 'xubuntu-desktop', 'ubuntustudio-desktop', 'mythbuntu-desktop', 'kubuntu-netbook', 'lubuntu-desktop', 'ubuntu-gnome-desktop', 'ubuntu-mate-core', 'ubuntu-mate-desktop', 'ubuntukylin-desktop', 'ubuntu-budgie-desktop']' meta-pkgs installed

What output do you get for the command
sudo apt install ubuntu-desktop

Revision history for this message
Luca Hermes (lucahermes) said :
#9

This is the output of that command:

$ sudo apt install ubuntu-desktop
Reading package lists... Done
Building dependency tree
Reading state information... Done
ubuntu-desktop is already the newest version (1.450.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I checked the logs again, the line that you mentioned is actually gone, but it shows this now:

2023-03-09 19:22:44,869 WARNING Can't mark 'ubuntu-desktop' for upgrade (E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.)
2023-03-09 19:22:45,092 ERROR Dist-upgrade failed: 'Broken packages after upgrade: evolution-data-server, gnome-control-center, gnome-panel, libgirepository-1.0-1, ubuntu-desktop'

I am currently too stupid to update the log files to the newest state,
I will post the current log files as soon as I figured out how it works - sorry

Revision history for this message
Luca Hermes (lucahermes) said :
#10

I put it on pastebin, I hope that's fine
Here is the current apt.log: https://pastebin.com/di8B7wzj
and the main.log: https://pastebin.com/gxZbmhP8

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

Are the files on pastebin the newest ones?
They show yesterday's date! How far off from UTC is your local time?

Revision history for this message
Luca Hermes (lucahermes) said (last edit ):
#12

I didn't do another attempt today that's why I took yesterdays logs, sorry I should have updated.
But to be safe I ran it again, here are the files that definitely reflect the current state:

apt.log: https://pastebin.com/BDR8SKjE
main.log: https://pastebin.com/2fi2mY92

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

What output do you get for the command

apt --simulate remove gnome-panel

Revision history for this message
Luca Hermes (lucahermes) said :
#14

This is what I get:

$ apt --simulate remove gnome-panel
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  alacarte gnome-applets-data gnome-panel-data libpanel-applet3
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  gnome-applets gnome-panel gnome-session-flashback
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
Remv gnome-applets [3.36.4-0ubuntu1]
Remv gnome-session-flashback [1:3.36.5-0ubuntu1]
Remv gnome-panel [1:3.36.2-0ubuntu1]

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#15

I suggest that you remove gnome-panel and try the upgrade again.

gnome-panel is in the list of packages that are "broken after upgrade" and is the only one that is not a dependency of ubuntu-desktop.
If the upgrade works now, then it should be possible to re-install gnome-panel (or probably even more important gnome-session-flashback) afterwards.

Revision history for this message
Luca Hermes (lucahermes) said :
#16

Amazing, your last suggestion seems to work! Thanks a lot!

Just so I may learn a bit from this, from what I understand you looked through the list of broken packages in main.log where evolution-data-server, gnome-control-center, gnome-panel, libgirepository-1.0-1 and ubuntu-desktop are listed. Was it simply an educated guess that gnome-panel caused this problem?

Thanks again, much appreciated that you guys took the time.

Revision history for this message
Luca Hermes (lucahermes) said :
#17

Thanks Manfred Hampl, that solved my question.