W:GPG 错误和警告:无法验证以下包!

W:GPG 错误和警告:无法验证以下包!

我得到了以下输出sudo apt-get updatesudo apt-get upgrade命令。

user@user-VPCCB45FN:~$ sudo apt-get update
......
......
Ign http://in.archive.ubuntu.com trusty-backports/main Translation-en_US
Ign http://in.archive.ubuntu.com trusty-backports/multiverse Translation-en_US 
Ign http://in.archive.ubuntu.com trusty-backports/restricted Translation-en_US 
Ign http://in.archive.ubuntu.com trusty-backports/universe Translation-en_US   
Fetched 3,581 kB in 59s (59.9 kB/s)                                            
Reading package lists... Done
W: GPG error: http://download.virtualbox.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
W: GPG error: http://dl.google.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991
W: GPG error: http://dl.google.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991
W: GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
W: GPG error: http://archive.canonical.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://in.archive.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: https://download.01.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A902DDA375E52366
W: GPG error: http://security.ubuntu.com trusty-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://in.archive.ubuntu.com trusty-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://in.archive.ubuntu.com trusty-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY CC079478E5B13347
user@user-VPCCB45FN:~$ sudo apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  hostapd
The following packages will be upgraded:
  apport apport-gtk python3-apport python3-problem-report
4 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 275 kB of archives.
After this operation, 5,120 B of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
  python3-problem-report python3-apport apport apport-gtk
Install these packages without verification? [y/N] 

我尝试了以下现有的解决方案,但没有成功:

  1. GPG 错误 NO_PUBKEY:警告:无法验证以下软件包![关闭]
  2. 如何修复 GPG 错误“NO_PUBKEY”?

我怎么解决这个问题?

答案1

最后通过以下步骤解决了这个问题:

sudo mv /etc/apt/trusted.gpg.d/ /etc/apt/trusted.gpg.d.backup
sudo mkdir /etc/apt/trusted.gpg.d
sudo chmod 755 /etc/apt/trusted.gpg.d

然后,对于每个需要的键:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 54422A4B98AB5139

正如所提到的无法解决 GPG 错误关联。

相关内容