我正在尝试安装 Kubuntu 21.04,但出现了以前从未发生过的错误:
Restoring original system state
Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
我尝试禁用所有 PPA,但没有成功。
输出如下/var/log/dist-upgrade/main.log
:
2021-06-06 12:03:13,081 INFO Using config files '['./DistUpgrade.cfg', '/etc/update-manager/release-upgrades.d/ubuntu-advantage-upgrades.cfg']'
2021-06-06 12:03:13,082 INFO uname information: 'Linux Ideapad 5.8.0-55-generic #62-Ubuntu SMP Tue Jun 1 08:21:18 UTC 2021 x86_64'
2021-06-06 12:03:13,638 INFO apt version: '2.1.10ubuntu0.3'
2021-06-06 12:03:13,638 INFO python version: '3.8.6 (default, May 27 2021, 13:28:02)
[GCC 10.2.0]'
2021-06-06 12:03:13,643 INFO release-upgrader version '21.04.12' started
2021-06-06 12:03:13,655 INFO locale: 'fr_FR' 'UTF-8'
2021-06-06 12:03:13,715 INFO screen could not be run
2021-06-06 12:03:13,766 DEBUG Using 'DistUpgradeViewText' view
2021-06-06 12:03:13,820 DEBUG enable dpkg --force-overwrite
2021-06-06 12:03:13,869 DEBUG creating statefile: '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'
2021-06-06 12:03:18,043 DEBUG lsb-release: 'groovy'
2021-06-06 12:03:18,044 DEBUG _pythonSymlinkCheck run
2021-06-06 12:03:18,044 DEBUG openCache()
2021-06-06 12:03:18,045 DEBUG quirks: running PreCacheOpen
2021-06-06 12:03:18,045 DEBUG running Quirks.PreCacheOpen
2021-06-06 12:03:19,006 DEBUG Comparing 5.8.0-53 with
2021-06-06 12:03:19,006 DEBUG Comparing 5.8.0-55 with 5.8.0-53
2021-06-06 12:03:19,112 DEBUG /openCache(), new cache size 68054
2021-06-06 12:03:19,113 DEBUG need_server_mode(): run in 'desktop' mode, (because of pkg 'kubuntu-desktop')
2021-06-06 12:03:19,113 DEBUG checkViewDepends()
2021-06-06 12:03:19,118 DEBUG running doUpdate() (showErrors=False)
2021-06-06 12:03:20,448 DEBUG openCache()
2021-06-06 12:03:21,438 DEBUG Comparing 5.8.0-53 with
2021-06-06 12:03:21,438 DEBUG Comparing 5.8.0-55 with 5.8.0-53
2021-06-06 12:03:21,550 DEBUG /openCache(), new cache size 68054
2021-06-06 12:03:21,550 DEBUG doPostInitialUpdate
2021-06-06 12:03:21,550 DEBUG quirks: running hirsutePostInitialUpdate
2021-06-06 12:03:21,551 DEBUG running Quirks.hirsutePostInitialUpdate
2021-06-06 12:03:21,552 DEBUG checking for system vendor
2021-06-06 12:05:22,081 DEBUG abort called
2021-06-06 12:05:22,083 DEBUG openCache()
2021-06-06 12:05:23,193 DEBUG Comparing 5.8.0-53 with
2021-06-06 12:05:23,193 DEBUG Comparing 5.8.0-55 with 5.8.0-53
2021-06-06 12:05:23,318 DEBUG /openCache(), new cache size 68054
答案1
sudo apt-get purge snapd
解决方案是删除 snapd 。
答案2
也受此影响。删除 snapd 后它仍然影响我。此线程的最后一条评论指出了对我有用的修复方法https://github.com/microsoft/WSL/discussions/3489#discussioncomment-961901
我必须移除 snapd 和 screen!
1 -sudo apt-get purge snapd
2 -sudo apt-get purge screen
然后升级就顺利进行了。如果仍然失败,您可以cat /var/log/dist-upgrade/main.log
查看导致失败的原因!
答案3
我所要做的就是删除屏幕应用程序。幸运的是,无需删除snapd:
sudo apt purge screen