无法从 ubuntu 20.04 LTS 升级到 22.04 LTS

无法从 ubuntu 20.04 LTS 升级到 22.04 LTS

运行时sudo do-release-upgrade我最终收到错误

Checking package manager
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Calculating the changes

Calculating the changes

Could not calculate the upgrade 

An unresolvable problem occurred while calculating the upgrade. 

If none of this applies, then please report this bug using the 
command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal. If 
you want to investigate this yourself the log files in 
'/var/log/dist-upgrade' will contain details about the upgrade. 
Specifically, look at 'main.log' and 'apt.log'. 

/var/log/dist-upgrade/main.log看到以下内容

2022-09-10 19:16:11,956 DEBUG Marking 'ubuntu-desktop' for upgrade
2022-09-10 19:16:12,108 WARNING Can't mark 'ubuntu-desktop' for upgrade (E:Unable to correct problems, you have held broken packages.)
2022-09-10 19:16:12,350 ERROR Dist-upgrade failed: 'Broken packages after upgrade: ubuntu-desktop'

但是我找不到任何被扣留的破损包裹。sudo dpkg --get-selections | grep hold是空的。

运行sudo apt update && sudo apt upgrade并没有发现任何奇怪的事情

Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-security InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

答案1

经过反复试验,并查看了 /var/log/dist-upgrade/apt.log,很明显,问题主要是由 Python 3.10 软件包(及其依赖项)和其他几个已安装的应用程序(如 Zoom)引起的。删除这些软件包后(我使用了 Synaptic 软件包管理器),升级顺利完成。

相关内容