apt 更新失败。提示密钥不可用

apt 更新失败。提示密钥不可用

我正在尝试从 Ubuntu 18.04.6 LTS 升级。运行 sudo apt update失败并显示消息The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F。问题是这个密钥存在。sudo apt-key list返回

pub   rsa3072 2018-12-10 [SC]
      D43F 6401 4536 9C51 D786  DDEA 76F1 A20F F987 672F
uid           [ unknown] WineHQ packages <[email protected]>

我甚至尝试删除并重新创建密钥。完整输出来自sudo apt update

Hit:1 https://linux.teamviewer.com/deb stable InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease                                                                                                   
Get:3 https://dl.winehq.org/wine-builds/ubuntu focal InRelease [8,041 B]                                                                                  
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                                         
Hit:5 https://download.docker.com/linux/ubuntu bionic InRelease                                                                                           
Ign:6 https://pkg.jenkins.io/debian-stable binary/ InRelease                                                                                              
Ign:7 https://pkg.jenkins.io/debian binary/ InRelease                                                                                                     
Hit:8 http://packages.microsoft.com/repos/code stable InRelease                                                                                           
Hit:9 https://pkg.jenkins.io/debian-stable binary/ Release                                                                                                
Hit:10 https://pkg.jenkins.io/debian binary/ Release                                                                                                      
Hit:11 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                             
Hit:12 https://packages.microsoft.com/repos/ms-teams stable InRelease                                                                                     
Hit:13 http://ppa.launchpad.net/canonical-hwe-team/backport-iwlwifi/ubuntu bionic InRelease                                                               
Err:3 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
Ign:14 https://dl.bintray.com/sbt/debian  InRelease                                                                                                       
Hit:15 https://deb.nodesource.com/node_10.x bionic InRelease                                                                                              
Err:16 https://dl.bintray.com/sbt/debian  Release                                                                                                         
  404  Not Found [IP: 52.21.37.199 443]
Hit:18 http://us.archive.ubuntu.com/ubuntu bionic InRelease                                                                                               
Hit:19 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                       
Hit:20 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                     
Hit:21 http://ppa.launchpad.net/fontforge/fontforge/ubuntu bionic InRelease                                                                               
Hit:25 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease                                                                              
Hit:26 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bionic pgadmin4 InRelease                                         
Hit:17 https://packagecloud.io/AtomEditor/atom/any any InRelease                                                             
Hit:27 http://ppa.launchpad.net/remmina-ppa-team/remmina-next/ubuntu bionic InRelease                  
Hit:24 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease                        
Hit:28 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
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.
E: The repository 'https://dl.bintray.com/sbt/debian  Release' no longer has a Release file.
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.

答案1

好像你缺少公钥?你可以尝试从 Ubuntu 密钥服务器提取 Debian 密钥,如下所示:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 76F1A20FF987672F

相关内容