During a dist-upgrade operation I am encountering an issue with apt packages.
When running any of the following commands I encounter the same error:
$ sudo apt dist-upgrade
$ sudo apt --fix-broken install
$ sudo apt-get autoremove
Error:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
gdm3 : Depends: gir1.2-gdm-1.0 (= 41~rc-0ubuntu2pop0~1634915133~21.10~cf40258) but 42.0-1ubuntu6pop1~1650301427~22.04~2055533 is installed
Depends: libgdm1 (= 41~rc-0ubuntu2pop0~1634915133~21.10~cf40258) but 42.0-1ubuntu6pop1~1650301427~22.04~2055533 is installed
gnome-settings-daemon : Depends: gnome-settings-daemon-common (= 40.0.1-1ubuntu3pop0~1639691325~21.10~3bcd31b) but 42.1-1ubuntu3pop0~1651657687~22.04~0386384 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
I found 3 related articles, none of the solutions in them solved my problem:
- https://askubuntu.com/questions/124845/eerror-pkgproblemresolverresolve-generated-breaks-this-may-be-caused-by-hel
- https://askubuntu.com/questions/1279062/upgrade-from-18-04-to-20-04-prevented-by-eerror-pkgproblemresolverresolve-g
- https://askubuntu.com/questions/633544/e-error-pkgproblemresolverresolve-generated-breaks-this-may-be-caused-by-he
In the questions above they appear to be focused on specific packages, not a dist-upgrade, so I don't know how to simply identify and remove an offending package.
If I try to remove an offending package I get what looks like it will be a chain of dependencies that reach into the dist-upgrade, something I guess I don't want to mess with.
$ sudo apt-get remove gdm3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
gnome-settings-daemon : Depends: gnome-settings-daemon-common (= 40.0.1-1ubuntu3pop0~1639691325~21.10~3bcd31b) but 42.1-1ubuntu3pop0~1651657687~22.04~0386384 is to be installed
pop-desktop : Depends: gdm3 but it is not going to be installed
Recommends: io.elementary.sideload but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).