安装 Wine 后运行 sudo apt upgrade 时出现“公钥不可用...”错误

安装 Wine 后运行 sudo apt upgrade 时出现“公钥不可用...”错误

当我运行时sudo apt upgrade,我收到大量无法修复的错误:

Hit:1 http://gb.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]     
Hit:3 https://repo.steampowered.com/steam stable InRelease                     
Get:4 https://dl.winehq.org/wine-builds/ubuntu focal InRelease [8,041 B]       
Err:4 https://dl.winehq.org/wine-builds/ubuntu focal InRelease              
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
Hit:5 https://dl.google.com/linux/chrome/deb stable InRelease          
Get:6 http://gb.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Get:7 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Reading package lists... Done                                                  
W: GPG error: https://dl.winehq.org/wine-builds/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

我最近安装了 wine,它运行正常,但最近我尝试运行sudo apt update时发生了这种情况。我尝试在线搜索问题并按照步骤操作,但问题仍然存在。我还尝试卸载 wine、wine32 和 wine64,但也没有用。

答案1

WineHQ 已更改其 PGP 密钥。您需要按照以下步骤操作WineHQ 的文档并添加密钥环(风险自负;外部来源)

输入以下命令来下载并添加存储库密钥:

sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key

相关内容