我目前正在将笔记本电脑从 22.04 升级到 24.04.1 LTS,遇到了多个问题,但首先发生的情况如下
我尝试使用软件更新程序更新 Ubuntu,但它给出了以下错误消息:
"Failed to download repository information, check your internet connection"
然后,我单击“确定”后,它显示了以下消息:
"The software on this computer is up to date."
"However, Ubuntu 24.04.1 LTS is now available (you have 22.04)"
然后它向我展示了发行说明,我再次单击“升级”,出现了“发行版升级”窗口,在它向我显示此消息之前,它已经顺利通过了“设置新软件频道”部分
W:Updating from such a repository can't be done securely, and is therefore disabled by default.,
W:See apt-secure(8) manpage for repository creation and user configuration details.,
W:An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repo.protonvpn.com/debian stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8DD48989F43719CA,
E:The repository 'https://example.com/apt stable Release' does not have a Release file.
我尝试过处理无公钥错误和 example.com 错误,所以我将分别讨论我为它们做了什么
对于公钥错误,我尝试按照此“https://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey”帖子中的最佳答案进行操作,这使我在终端中输入了以下内容
sudo mkdir -m 0755 -p /etc/apt/keyrings/
curl -fsSL https://example.com/EXAMPLE.gpg |
sudo gpg --dearmor -o /etc/apt/keyrings/EXAMPLE.gpg
echo "deb [signed-by=/etc/apt/keyrings/EXAMPLE.gpg] https://example.com/apt stable main" |
sudo tee /etc/apt/sources.list.d/EXAMPLE.list > /dev/null
我很确定这就是导致 example.com 没有 Release 文件的问题的原因,但我将继续
之后我又尝试彻底删除 proton VPN,结果还是不行,于是我输入了他们网站上的这些命令
sudo apt autoremove proton-vpn-gnome-desktop && sudo apt purge protonvpn-stable-release
之后我尝试按照其说明删除旧版本
sudo apt-get autoremove protonvpn
rm -rf ~/.cache/protonvpn
rm -rf ~/.config/protonvpn
据我所知,已成功删除 proton vpn,但尝试更新时仍然出现无公钥错误(遗憾的是我没有最初执行此操作时的输出(我关闭了终端窗口)但这是我再次执行此操作时的输出)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'protonvpn' is not installed, so not removed
0 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.
至于错误,我相信我是在按照这个[解决方案](如何修复 GPG 错误“NO_PUBKEY”?发布说明 )"E:The repository 'https://example.com/apt stable Release' does not have a Release file."
后意外创建的。
所以我的问题是如何解决这个问题?我假设我必须删除 example.com 和 proton vpn 的一些文件,但我不知道该怎么做
(此外,我不希望进行全新安装,但如果您认为我应该这样做,我可能会这样做)
您应该已经安装了“软件和更新”应用。打开它并转到“其他软件”选项卡。您可以从那里删除示例存储库