Ubuntu从23.04升级至23.10时遭遇依赖损坏问题,无法完成升级求助
我刚从22.04 LTS升级到23.04,现在尝试升级到23.10的过程中遇到了以下错误:
Could not calculate the upgrade
[...]
This was likely caused by:
- Unofficial software packages not provided by Ubuntu.
[...]
错误对话框的样子如下(图片来自reddit帖子):
我查看了/var/log/dist-upgrade/main.log,发现了这条警告:
WARNING Can't mark 'ubuntu-desktop' for upgrade(E:Unable to correct problems, you have held broken packages.)
于是我运行了命令:
apt-mark showhold
之后我执行了:
sudo apt update ; sudo apt install ubuntu-desktop^
它安装了一堆内容,但之后问题依旧。
我还尝试了以下命令:
$ sudo sed -i 's/lunar/mantic/g' /etc/apt/sources.list $ sudo apt update && sudo apt dist-upgrade
结果出现了未满足的依赖问题:
The following packages have unmet dependencies:
gnome-remote-desktop : Depends: libmutter-12-0 (>= 44~) but it is not going to be installed
gnome-shell : Depends: gir1.2-mutter-12 (>= 44.2) but it is not going to be installed
Depends: libmutter-12-0 (>= 44.2) but it is not going to be installed
E: Broken packages
下面是一些有用的输出信息:
apt-cache policy ubuntu-desktop 的输出:
ubuntu-desktop: Installed: 1.501 Candidate: 1.501 *** 1.501 500 500 http://se.archive.ubuntu.com/ubuntu lunar/main amd64 Packages 100 /var/lib/dpkg/status
apt-cache policy gnome-remote-desktop libmutter-12-0 gnome-shell gir1.2-mutter-12 libmutter-12-0 的输出:
gnome-remote-desktop: Installed: 44.2-0ubuntu1 Candidate: 45.0-1 Version table: 45.0-1 500 500 http://se.archive.ubuntu.com/ubuntu mantic/main amd64 Packages *** 44.2-0ubuntu1 100 100 /var/lib/dpkg/status libmutter-12-0: Installed: 44.3-0ubuntu1.1 Candidate: 44.3-0ubuntu1.1 Version table: *** 44.3-0ubuntu1.1 100 100 /var/lib/dpkg/status gnome-shell: Installed: 44.3-0ubuntu1.1 Candidate: 45.1-0ubuntu1 Version table: 45.1-0ubuntu1 500 500 http://se.archive.ubuntu.com/ubuntu mantic-updates/main amd64 Packages 45.0-1ubuntu2 500 500 http://se.archive.ubuntu.com/ubuntu mantic/main amd64 Packages *** 44.3-0ubuntu1.1 100 100 /var/lib/dpkg/status gir1.2-mutter-12: Installed: 44.3-0ubuntu1.1 Candidate: 44.3-0ubuntu1.1 Version table: *** 44.3-0ubuntu1.1 100 100 /var/lib/dpkg/status libmutter-12-0: Installed: 44.3-0ubuntu1.1 Candidate: 44.3-0ubuntu1.1 Version table: *** 44.3-0ubuntu1.1 100 100 /var/lib/dpkg/status
grep ^deb /etc/apt/sources.list.d/* 的输出:
/etc/apt/sources.list.d/1password.list:deb [arch=amd64 signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/amd64 stable main /etc/apt/sources.list.d/1password.list.distUpgrade:deb [arch=amd64 signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/amd64 stable main /etc/apt/sources.list.d/1password.list.save:deb [arch=amd64 signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/amd64 stable main /etc/apt/sources.list.d/brave-browser-release.list:deb [arch=amd64 signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main /etc/apt/sources.list.d/brave-browser-release.list.distUpgrade:deb [arch=amd64 signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main /etc/apt/sources.list.d/brave-browser-release.list.save:deb [arch=amd64 signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main /etc/apt/sources.list.d/docker.list:deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable /etc/apt/sources.list.d/docker.list.distUpgrade:deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable /etc/apt/sources.list.d/docker.list.save:deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable /etc/apt/sources.list.d/mozillateam-ubuntu-ppa-jammy.list.save:deb https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu/ lunar main # disabled on upgrade to lunar
grep ^deb /etc/apt/sources.list 的输出:
deb http://se.archive.ubuntu.com/ubuntu/ mantic main restricted deb http://se.archive.ubuntu.com/ubuntu/ mantic-updates main restricted deb http://se.archive.ubuntu.com/ubuntu/ mantic universe deb http://se.archive.ubuntu.com/ubuntu/ mantic-updates universe deb http://se.archive.ubuntu.com/ubuntu/ mantic multiverse deb http://se.archive.ubuntu.com/ubuntu/ mantic-updates multiverse deb http://se.archive.ubuntu.com/ubuntu/ mantic-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu mantic-security main restricted deb http://security.ubuntu.com/ubuntu mantic-security universe deb http://security.ubuntu.com/ubuntu mantic-security multiverse
现在我有点不知所措了,接下来该怎么做呢?
备注:内容来源于stack exchange,提问作者klutt

