我正在尝试升级,但遇到了错误。我使用 sudo 启动升级do-release-upgrade
,一切顺利,直到 98%。然后我在分离的终端上收到此错误:
2022-08-16 10:57:21,415 DEBUG Installing 'linux-generic' (linux metapackage may have been accidentally uninstalled)
2022-08-16 10:57:21,779 ERROR not handled exception:
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-9ycgla6n/jammy", line 8, in <module>
sys.exit(main())
File "/tmp/ubuntu-release-upgrader-9ycgla6n/DistUpgrade/DistUpgradeMain.py", line 241, in main
if app.run():
File "/tmp/ubuntu-release-upgrader-9ycgla6n/DistUpgrade/DistUpgradeController.py", line 2042, in run
return self.fullUpgrade()
File "/tmp/ubuntu-release-upgrader-9ycgla6n/DistUpgrade/DistUpgradeController.py", line 1991, in fullUpgrade
if not self.calcDistUpgrade():
File "/tmp/ubuntu-release-upgrader-9ycgla6n/DistUpgrade/DistUpgradeController.py", line 1100, in calcDistUpgrade
if not self.cache.installTasks(self.tasks):
AttributeError: 'DistUpgradeController' object has no attribute 'tasks'
探索 apt.log,我发现一堆损坏的软件包,如下:
Starting pkgProblemResolver with broken count: 55
Starting 2 pkgProblemResolver with broken count: 55
Investigating (0) gnome-shell:amd64 < 3.36.9-0ubuntu0.20.04.2 -> 42.2-0ubuntu0.2 @ii umU Ib >
Broken gnome-shell:amd64 Breaks on gnome-shell-extension-desktop-icons:amd64 < 20.04.0-3~ubuntu20.04.6 @ii mK > (< 21.04)
或关于libinvidia-470
:
Investigating (0) libnvidia-compute-470:amd64 < 470.141.03-0ubuntu0.22.04.1 @ii mK Ib >
Broken libnvidia-compute-470:amd64 Conflicts on libcuda-10.0-1:amd64 < none @un H >
Conflicts//Breaks against version 515.65.01-0ubuntu0.22.04.1 for libnvidia-compute-515-server but that is not InstVer, ignoring
Conflicts//Breaks against version 515.65.01-0ubuntu0.22.04.1 for libnvidia-compute-515 but that is not InstVer, ignoring
Conflicts//Breaks against version 510.85.02-0ubuntu0.22.04.1 for libnvidia-compute-510-server but that is not InstVer, ignoring
Considering libnvidia-compute-510:amd64 3 as a solution to libnvidia-compute-470:amd64 4
Added libnvidia-compute-510:amd64 to the remove list
我的机器有:
操作系统:Ubuntu 20.04.4 LTS x86_64;内核:5.15.0-46-generic;软件包:3896(dpkg)、34(snap);Shell:bash 5.0.17;桌面环境:GNOME;终端机:Wayland;窗口管理器:Mutter;终端:gnome-terminal;CPU:Intel i7-4910MQ (8) @ 2.900GHz;GPU:NVIDIA GeForce GT 730M;GPU:Intel 第四代酷睿处理器;内存:4180MiB / 15879MiB。
感谢您的任何意见!
编辑:更正命令。
答案1
赶紧跑:
sudo python3 -m pip uninstall distro-info
sudo apt reinstall python3-distro-info
另请查看此错误报告:do-release-upgrade 失败 19.10->20.04 AttributeError:'UbuntuDistroInfo' 对象没有属性'version'