通过VirtualBox很久以前安装了Ubuntu Desktop 20.04(focal
)并成功升级到22.04jammy
sudo apt update
现在,当执行命令时出现这篇文章的原因:
sudo apt update
Hit:1 http://repo.mysql.com/apt/ubuntu focal InRelease
Hit:2 https://download.docker.com/linux/ubuntu focal InRelease
Hit:3 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 http://pe.archive.ubuntu.com/ubuntu jammy InRelease
Hit:6 http://pe.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:7 http://pe.archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
11 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: http://repo.mysql.com/apt/ubuntu/dists/focal/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
观察前两行,它们包含该focal
术语,其他行也包含该jammy
术语。
如何将存储库位置从 升级focal
到jammy
?
目标是正确更新 MySQL 和 Docker。
打开
Software & Sources
,然后转到Other Software
选项卡。找到MySQL和Docker对应的仓库,点击
Edit
。之后,更改
focal
为jammy
. 跑步sudo apt update
。请注意,存储库可能不托管软件包
jammy
(在这种情况下,sudo apt update
将显示警告,如果发生这种情况,最好删除这些存储库)。在 Ubuntu Server 中,您可以在目录中找到软件源(文本文件)
/etc/apt/sources.list.d/
。编辑它们,并将 focus 替换为 jammy。(此方法在Ubuntu桌面上也适用)