從 20.04.4 LTS 升級到 22.04.1 LTS 時發生錯誤

從 20.04.4 LTS 升級到 22.04.1 LTS 時發生錯誤

我正在嘗試升級,但遇到錯誤。我使用 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

滿的主日誌apt日誌可用。

我的機器有:

作業系統:Ubuntu 20.04.4 LTS x86_64;核心:5.15.0-46-generic;包裝:3896(dpkg)、34(snap);外殼:bash 5.0.17; DE:侏儒; DM:韋蘭; WM:咕噥;終端:gnome 終端; CPU:Intel i7-4910MQ (8) @ 2.900GHz;顯示卡:NVIDIA GeForce GT 730M; GPU:英特爾第四代酷睿處理器;內存: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'

相關內容