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

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

当我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%。我还需要做什么?

答案1

截至 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会显示错误并失败。

答案2

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

全文如下:

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

答案3

检查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) <[email protected]>
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 <[email protected]>
gpg: key 76F1A20FF987672F: 1 signature not checked due to a missing key
gpg: Total number processed: 1

答案4

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

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

希望这可以帮助!

相关内容