我在一台机器上安装了 Ubuntu 20.04.6 LTS,我想将操作系统升级到 24.04。我运行了apt update
和apt upgrade
。两者都成功运行,apt update 给出了一些警告。当我运行 时do-release-upgrade
,它给出
升级之前,请安装适合您的版本的所有可用更新。
运行时apt-update
,它发出以下警告
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 focal 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/focal/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.
我尝试直接使用添加密钥
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
但它给了gpg: keyserver receive failed: Network is unreachable
然后我在类似问题的帮助下尝试了以下命令
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B7B3B788A8D3785C
但它也会抛出gpg: keyserver receive failed: Connection timed out
我还尝试使用 ping 获取 keyserver.ubuntu.com 的 IP,并尝试以下命令:
sudo apt-key adv --keyserver 185.125.188.26 --recv-keys 467B942D3A79BD29
但它也给了我同样的gpg: keyserver receive failed: Connection timed out
我也尝试添加nameserver 8.8.8.8 # Google DNS
机器/etc/resolv.conf
,但问题仍然存在。
该机器位于防火墙和代理后面。