Apt
在 dist-upgrade: Error, pkgProblemResolver::Resolve 生成 的中斷,這可能是由持有的包引起的
在
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,所以我不知道如何簡單地辨識和刪除有問題的包。
如果我試圖刪除一個有問題的包,我會得到一個看起來像它的依賴鏈,這些依賴鏈會
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).
我在這裡找到了主要的 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
根據我遇到的其他資源,特別是我缺少的東西。