在终端上尝试使用以下命令Ubuntu-18.04
进行升级Ubuntu-20.04LTS
$ sudo apt-get update
$ sudo apt-get upgrade --yes
$ sudo apt-get dist-upgrade --yes
$ sudo apt-get dist-upgrade --yes
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Error!
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libsnmp-base : Breaks: snmp (< 5.7.3+dfsg-5) but 5.7.3+dfsg-1.8ubuntu3.6 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
已下载并安装使用dpkg --force-all -i libsnmp-base_5.7.3+dfsg-1.8ubuntu3.6_all.deb
但--fix-broken
无法帮助修复。
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 363 not upgraded.
仍然导致相同的错误。任何修复此错误的指针都会有所帮助。
答案1
Aptitude 可能有助于您修复此问题。如果已安装,请按如下方式使用
sudo aptitude dist-upgrade
获取现有系统的最新依赖关系,然后按照其建议寻找可能的解决方案。
如果尚未安装,请安装并重sudo apt-get install aptitude
试上述命令。
并且只有当 18.04 LTS 上的所有依赖问题都得到修复后,您才可以使用sudo do-release-upgrade
(在 GUI 中)或update-manager -c
(在桌面上)运行升级到 20.04 LTS 的过程。