无法在Ubuntu 14.04上连接和GPG错误

我在apt-get update时遇到以下错误

Err http://extras.ubuntu.com trusty InRelease Err http://extras.ubuntu.com trusty Release.gpg Unable to connect to extras.ubuntu.com:http: Fetched 1,508 kB in 2min 5s (12.0 kB/s) Reading package lists... Done 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 78414460095F1873 W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/Release.gpg Unable to connect to extras.ubuntu.com:http: W: Some index files failed to download. They have been ignored, or old ones used instead. 

我不知道如何解决这个问题。

您可以通过安装名为Y PPA Manager的软件来解决此问题。
在终端中复制并粘贴这些命令以下载并安装它:

  1. sudo add-apt-repository ppa:webupd8team/y-ppa-manager
  2. sudo apt-get update
  3. sudo apt-get install y-ppa-manager

在此之后从破折号启动它。 启动后,搜索名为“高级”的选项,然后单击“尝试导入所有丢失的GPG密钥”。 然后等待一段时间,直到收到完成通知。
在此之后单击“尝试修复所有GPG BADSIG错误”。 等待一段时间,直到收到完成通知。
然后尝试更新,你不会得到任何错误。 如果您有任何问题,请发表评论

不使用任何外部工具(当然除了谷歌 )你可以这样做。 在这个问题中提到了一个解决方案。 添加GPG键很容易。 您需要缺少的pubkey的ID,它会显示在您收到的错误消息中。 在您的情况下,ID为78414460095F1873。 您可以通过执行来修复错误

 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2EA8F35793D8809A