升级到 Ubuntu 23.10 失败 - 无法将“ubuntu-desktop”标记为升级

升级到 Ubuntu 23.10 失败 - 无法将“ubuntu-desktop”标记为升级

我尝试通过运行将 Ubuntu 23.04 升级到 23.10 sudo do-release-upgrade,但出现以下错误:

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

Calculating the changes

Calculating the changes

Could not calculate the upgrade 

An unresolvable problem occurred while calculating the upgrade. 

This was likely caused by: 
* Unofficial software packages not provided by Ubuntu 
Please use the tool 'ppa-purge' from the ppa-purge 
package to remove software from a Launchpad PPA and 
try the upgrade again. 

我查看了日志文件,这是我看到的唯一错误:

2023-11-10 11:23:46,189 DEBUG Marking 'ubuntu-desktop' for upgrade
2023-11-10 11:23:46,389 WARNING Can't mark 'ubuntu-desktop' for upgrade (E:Unable to correct problems, you have held broken packages.)
2023-11-10 11:23:46,541 ERROR Dist-upgrade failed: 'Broken packages after upgrade: ubuntu-desktop'
$ cat /etc/apt/sources.list

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu lunar main restricted
# deb-src http://archive.ubuntu.com/ubuntu lunar main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu lunar-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu lunar-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu lunar universe
# deb-src http://archive.ubuntu.com/ubuntu lunar universe
deb http://archive.ubuntu.com/ubuntu lunar-updates universe
# deb-src http://archive.ubuntu.com/ubuntu lunar-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu lunar multiverse
# deb-src http://archive.ubuntu.com/ubuntu lunar multiverse
deb http://archive.ubuntu.com/ubuntu lunar-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu lunar-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu lunar-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu lunar-backports main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu lunar-security main restricted
# deb-src http://archive.ubuntu.com/ubuntu lunar-security main restricted
deb http://archive.ubuntu.com/ubuntu lunar-security universe
# deb-src http://archive.ubuntu.com/ubuntu lunar-security universe
deb http://archive.ubuntu.com/ubuntu lunar-security multiverse
# deb-src http://archive.ubuntu.com/ubuntu lunar-security multiverse
$ ll /etc/apt/sources.list.d
total 56
-rw-r--r-- 1 root root 112 Nov 10 11:23 docker.list
-rw-r--r-- 1 root root 112 Nov 10 07:02 docker.list.distUpgrade
-rw-r--r-- 1 root root  67 Nov 10 11:23 dropbox.list
-rw-r--r-- 1 root root  67 Nov 10 07:02 dropbox.list.distUpgrade
-rw-r--r-- 1 root root 121 Nov 10 11:23 github-cli.list
-rw-r--r-- 1 root root 121 Nov 10 07:02 github-cli.list.distUpgrade
-rw-r--r-- 1 root root 190 Nov 10 11:23 google-chrome.list
-rw-r--r-- 1 root root 190 Nov 10 07:02 google-chrome.list.distUpgrade
-rw-r--r-- 1 root root 193 Nov 10 11:23 slack.list
-rw-r--r-- 1 root root 193 Nov 10 07:02 slack.list.distUpgrade
-rw-r--r-- 1 root root 203 Nov 10 11:23 vscode.list
-rw-r--r-- 1 root root 203 Nov 10 07:02 vscode.list.distUpgrade
-rw-r--r-- 1 root root  55 Nov 10 11:23 zulip-desktop.list
-rw-r--r-- 1 root root  55 Nov 10 07:02 zulip-desktop.list.distUpgrade
$ cat /etc/apt/sources.list.d/*.list
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu   lunar stable
deb [arch=i386,amd64] http://linux.dropbox.com/ubuntu kinetic main
deb [arch=amd64 signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
deb https://download.zulip.com/desktop/apt stable main

/var/log/dist-upgrade/apt.log

 MarkDelete ubuntu-desktop-minimal:amd64 < 1.501 @ii umH Ib > FU=0

Investigating (2) ubuntu-desktop:amd64 < 1.501 -> 1.524 @ii pumU Ib >
Broken ubuntu-desktop:amd64 Depends on gdm3:amd64 < 44.0-1ubuntu2 @ii umR >
  Considering gdm3:amd64 16 as a solution to ubuntu-desktop:amd64 10001
  Added gdm3:amd64 to the remove list
Broken ubuntu-desktop:amd64 Depends on gnome-shell-extension-ubuntu-tiling-assistant:amd64 < none @un mH >
  Considering gnome-shell-extension-ubuntu-tiling-assistant:amd64 1 as a solution to ubuntu-desktop:amd64 10001
Broken ubuntu-desktop:amd64 Depends on ubuntu-desktop-minimal:amd64 < 1.501 @ii umR >
  Considering ubuntu-desktop-minimal:amd64 1 as a solution to ubuntu-desktop:amd64 10001
  Added ubuntu-desktop-minimal:amd64 to the remove list
  MarkKeep gdm3:amd64 < 44.0-1ubuntu2 @ii umR > FU=0
  Fixing ubuntu-desktop:amd64 via keep of gdm3:amd64
  MarkKeep ubuntu-desktop-minimal:amd64 < 1.501 @ii umR > FU=0
  Fixing ubuntu-desktop:amd64 via keep of ubuntu-desktop-minimal:amd64
Investigating (2) gdm3:amd64 < 44.0-1ubuntu2 @ii umH Ib >
Broken gdm3:amd64 Depends on gir1.2-gdm-1.0:amd64 < 44.0-1ubuntu2 -> 45~beta-1ubuntu1 @ii umU > (= 44.0-1ubuntu2)
  Considering gir1.2-gdm-1.0:amd64 16 as a solution to gdm3:amd64 10001
  Added gir1.2-gdm-1.0:amd64 to the remove list
Broken gdm3:amd64 Depends on libgdm1:amd64 < 44.0-1ubuntu2 -> 45~beta-1ubuntu1 @ii umU > (= 44.0-1ubuntu2)
  Considering libgdm1:amd64 6 as a solution to gdm3:amd64 10001
  Added libgdm1:amd64 to the remove list
  MarkKeep gir1.2-gdm-1.0:amd64 < 44.0-1ubuntu2 -> 45~beta-1ubuntu1 @ii umU > FU=0
  Fixing gdm3:amd64 via keep of gir1.2-gdm-1.0:amd64
  MarkKeep libgdm1:amd64 < 44.0-1ubuntu2 -> 45~beta-1ubuntu1 @ii umU > FU=0
  Fixing gdm3:amd64 via keep of libgdm1:amd64
 Try to Re-Instate (2) libgdm1:amd64
  MarkKeep libgdm1:amd64 < 44.0-1ubuntu2 -> 45~beta-1ubuntu1 @ii umU > FU=0
Investigating (3) ubuntu-desktop:amd64 < 1.501 -> 1.524 @ii pumU Ib >
Broken ubuntu-desktop:amd64 Depends on gnome-shell-extension-ubuntu-tiling-assistant:amd64 < none @un mH >
  Considering gnome-shell-extension-ubuntu-tiling-assistant:amd64 1 as a solution to ubuntu-desktop:amd64 10001
 Try to Re-Instate (3) gir1.2-gdm-1.0:amd64
  MarkKeep gir1.2-gdm-1.0:amd64 < 44.0-1ubuntu2 -> 45~beta-1ubuntu1 @ii umU > FU=0
Done

$ apt policy ubuntu-desktop
ubuntu-desktop:
  Installed: 1.501
  Candidate: 1.501
  Version table:
 *** 1.501 500
        500 http://archive.ubuntu.com/ubuntu lunar/main amd64 Packages
        100 /var/lib/dpkg/status

知道现在该做什么吗?

答案1

遇到了同样的问题。最终对我有用的是

sudo apt reinstall gnome-shell-extension-ubuntu-tiling-assistant
sudo apt reinstall ubuntu-desktop
sudo do-release-upgrade

答案2

我也遇到过这种情况。对我而言,唯一有效的方法就是遵循https://www.reddit.com/r/Ubuntu/comments/xcaurm/help_cant_mark_ubuntudesktop_for_upgrade_while/。虽然我必须卸载大量的软件包。Ubuntu 安装完成后,它会将我留在终端中,直到我重新安装这些软件包,因此请将列表保存在文本文件中或终端可访问的某个位置。

sudo dpkg --remove --force-remove-reinstreq ubuntu-desktop gnome-remote-desktop gnome-shell gdm3 cinnamon-core ubuntu-desktop-minimal mutter gnome-shell-extension-ubuntu-dock gnome-shell-extension-desktop-icons-ng gnome-shell-extension-appindicator ubuntu-sessio

相关内容