在dist-upgrade
操作过程中,我遇到了 apt 软件包的问题。
运行以下任何命令时,我遇到相同的错误:
$ sudo apt dist-upgrade
$ sudo apt --fix-broken install
$ sudo apt-get autoremove
错误:
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
我找到了3篇相关文章,其中的解决方案都没有解决我的问题:
- 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
在上面的问题中,他们似乎专注于特定的软件包,而不是发行版升级,所以我不知道如何简单地识别和删除有问题的软件包。
如果我尝试删除一个有问题的包,我会得到看起来像是一系列依赖项,这些依赖项会到达dist-upgrade
,我想我不想弄乱它。
$ 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).
答案1
我在这里找到了主要的 PopOS 升级线程:
https://www.reddit.com/r/pop_os/comments/ucge6e/upgrade_help_thread/
这些步骤为我解决了问题:
pop-upgrade release repair
sudo apt-get install -f
sudo apt-get full-upgrade --allow-downgrades
--allow-downgrades
根据我遇到的其他资源,我特别缺少一些东西。