Wine的签名验证错误-索引文件下载失败-更改镜像无济于事


20

当我sudo apt-get update收到如下所示的错误时。

W: An error occurred during the signature verification. 
The repository is not updated and the previous index files will be used. 
GPG error: https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: 
The following signatures couldn't be verified
 because the public key is not available: NO_PUBKEY 76F1A20FF987672F
W: Failed to fetch https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/InRelease
The following signatures couldn't be verified
 because the public key is not available: NO_PUBKEY 76F1A20FF987672F
W: Some index files failed to download. They have been ignored, or old ones used instead.

因此,我继续按照Ask Ubuntu答案的建议更换镜子。然后,我重新启动计算机。而且我仍然在上面遇到相同的错误sudo apt-get update

让我们尝试重新安装密钥。

$ wget -nc https://dl.winehq.org/wine-builds/Release.key && sudo apt-key add Release.key
File ‘Release.key’ already there; not retrieving. OK

我也可能会这样ping -c3 archive.ubuntu.com,我的数据包丢失率为0%。我还需要做什么?


2
看来新的葡萄酒更新使用与他们托管的Release.key不同的密钥签名了
user3074620 '18

1
请为命令输出使用代码格式(就像命令一样),而不是引号格式。
muru

Answers:


13

请注意,添加新的密钥文件后,最好使用apt update而不是apt-get update,因为它会提示您接受更改。

因此完整:

wget -nc https://dl.winehq.org/wine-builds/winehq.key && sudo apt-key add winehq.key && sudo apt update

2
我还添加了存储库sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main',此解决方案有效。如前所述,您必须使用sudo apt update而不是sudo apt-get updateapt强迫您明确接受,apt-get但不接受,并会产生错误。如果您有其他版本的Ubuntu,则可以在此处找到要添加的存储库wiki.winehq.org/Ubuntu
Jason Hunter,

我会考虑在开始rm winehq.key时将文件添加或保存到/temp。不管怎么说,还是要谢谢你!
kcpr

22

截至2018年12月19日08:07,这里winehq.key提到一个新的密钥文件。

下载新的存储库密钥并将其添加到受信任密钥列表中:

cd /tmp
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt update

正如@ jason-hunter在评论中提到的那样,apt update将询问您是否接受存储库中的更改,而apt-get update会显示错误并失败。


10

检查https://dl.winehq.org/wine-builds/,有一个新文件winehq.key。尝试使用它,因为它的指纹似乎与错误匹配:

# curl -sL "https://dl.winehq.org/wine-builds/Release.key" | gpg --dry-run --import --verbose
gpg: pub  rsa4096/818A435C5FCBF54A 2015-11-23  Sebastian Lackner (WineHQ packages) <sebastian@fds-team.de>
gpg: Total number processed: 1
# curl -sL "https://dl.winehq.org/wine-builds/winehq.key" | gpg --dry-run --import --verbose
gpg: pub  rsa3072/76F1A20FF987672F 2018-12-10  WineHQ packages <wine-devel@winehq.org>
gpg: key 76F1A20FF987672F: 1 signature not checked due to a missing key
gpg: Total number processed: 1

7

这个命令对我有用:

wget -nc https://dl.winehq.org/wine-builds/winehq.key && apt-key add winehq.key

0

我最近也遇到了同样的错误:

Err:3 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease                
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F

事实证明,该公钥需要添加到我的主机中。添加密钥是您在那里看到的密钥的后8位数字F987672F。因此,将其添加到以下内容以将密钥添加到主机:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv F987672F

希望这可以帮助!

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.