在通过 VirtualBox 将 Ubuntu Desktop 20.04 升级到 22.04 后,focal
目录jammy
中/etc/apt/sources.list.d
存在该mysql.list
文件。
根据一项研究,建议打开该文件并将其从 更改local
为jammy
. 因此我现在有
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out entries below, but any other modifications may be lost.
# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications.
deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-apt-config
deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-8.0
deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-tools
#deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-tools-preview
deb-src http://repo.mysql.com/apt/ubuntu/ jammy mysql-8.0
manueljordan@mac2013-vb143:/etc/apt/sources.list.d$
现在,当执行该sudo apt update
命令时,会发生以下情况:
sudo apt update
Get:1 http://repo.mysql.com/apt/ubuntu jammy InRelease [20.2 kB]
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
Err:1 http://repo.mysql.com/apt/ubuntu jammy InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
Hit:7 http://pe.archive.ubuntu.com/ubuntu jammy-backports InRelease
Fetched 20.2 kB in 2s (11.7 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
16 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql.com/apt/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
W: Failed to fetch http://repo.mysql.com/apt/ubuntu/dists/jammy/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
W: Some index files failed to download. They have been ignored, or old ones used instead.
正如你所看到的,有很多错误
升级mysql.list文件后如何修复apt update?
之前已经回答过。您唯一需要更改的是报告的公钥。
以下命令是那里的解决方案: