报错
ubuntu-release-upgrader-gtk : Depends: ubuntu-release-upgrader-core (= 1:20.04.41) but 1:22.04.20 is to be installed
Depends: python3-distupgrade (= 1:20.04.41) but 1:22.04.20 is to be installed
Depends: gir1.2-gtk-3.0 but it is not installable
Depends: gir1.2-webkit2-4.0 but it is not going to be installed
update-manager : Depends: update-manager-core (= 1:20.04.10.23) but 1:22.04.21 is to be installed
Depends: libgtk3-perl but it is not going to be installed
Depends: gir1.2-gtk-3.0 but it is not installable
Depends: gnome-shell but it is not installable or
policykit-1-gnome but it is not going to be installed or
polkit-kde-agent-1 but it is not going to be installed or
lxpolkit but it is not going to be installed or
lxqt-policykit but it is not going to be installed or
mate-polkit but it is not going to be installed or
polkit-1-auth-agent
xdg-desktop-portal : Depends: libgdk-pixbuf2.0-0 (>= 2.22.0) but it is not installable
原因
source.list没有指向正确的Ubuntu 22.04(Jammy Jellyfish)仓库:
按照博客link去做的,但是没有注意博主讲的是ubuntu20版本,于是把source.list改错,改成Ubuntu22.04对应的链接即可:
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multivers
结果
更新软件源
sudo apt-get update
升级所以软件
sudo apt-get upgrade
安装gnome桌面环境
sudo apt-get install ubuntu-desktop
安装相关工具(包名变更:从 Ubuntu 18.04 开始,gnome-tweak-tool 更名为 gnome-tweaks)
sudo apt-get install gnome-tweaks
安装成功