This morning when I do apt-get update on my new Ubuntu 14.04 server, I got these error messages:

Reading package lists… Done 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://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://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: http://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

After did some small research on Google, I found a way to overcome this GPG NO_PUBKEY error by downloading the missing key using apt-key tools. The command is as follow:

 
1
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5

Command result:

 
1
2
3
4
5
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.nbL6QNuTxI --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
gpg: requesting key 437D05B5 from hkp server keyserver.ubuntu.com
gpg: key 437D05B5: public key "Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1

Second command:

 
1
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32

Result:

 
1
2
3
4
5
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.scMJ2LlY0s --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
gpg: requesting key C0B21F32 from hkp server keyserver.ubuntu.com
gpg: key C0B21F32: public key "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

Notice that code 40976EAF437D05B5 and 3B4FE6ACC0B21F32 was taken from the error messages above.

Now you can do apt-get update again and you should have no error anymore.

How to fix apt-get GPG error NO_PUBKEY Ubuntu 14的更多相关文章

  1. ubuntu/debian gpg error no_pubkey 解决方法

    GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified b ...

  2. GPG error [...] NO_PUBKEY [...]

    今天在Linux下遇到这个问题,发现很多资料都是英文的,为了方便出现同样错误的有英语阅读困难的人,整理解决方案如下: sudo apt-key adv --keyserver keyserver.ub ...

  3. ubuntu apt update时W: GPG error http://ppa.launchpad.net lucid Release没有公钥无法验证NO_PUBKEY签名问题解决

    在安装更新时,即在运行命令行sudo apt-get update 或者运行更新管理器的时候,出现W: GPG 错误: W: GPG error: http://ppa.launchpad.net/o ...

  4. Ubuntu W: GPG error: http://archive.ubuntukey....NO_PUBKEY 8D5A09

    在用 sudo apt-get update 时出现这样的报错: W: GPG error: http://archive.ubuntukylin.com:10006/ubuntukylin xeni ...

  5. GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F60F4B3D7FA2AF80

    今天在更新运行apt-get update的时候出现了如下的错误: W: GPG error: http://extras.ubuntu.com trusty Release: The followi ...

  6. W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8CF63AD3F06FC659

    报错信息: W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be ...

  7. apt GPG error

    W: GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified ...

  8. Ubuntu 更新源失败[GPG error]

    对于错误 GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verif ...

  9. ubuntu更换源后报错:W: GPG error: (转载)

    From:http://www.njava.com/njava-626.html 更换163源后,更新源时出现错误. # apt-get update W: GPG error: http://ext ...

随机推荐

  1. UIView常用属性与方法/UIKit继承结构

    UIView常用属性与方法 @interface UIView : UIResponder<NSCoding, UIAppearance, UIAppearanceContainer, UIDy ...

  2. 用js 创建  简单查找 删除 二叉树

    <!DOCTYPE html> <html> <body> <canvas id="myCanvas" width="2000& ...

  3. linux中的阻塞机制及等待队列

    阻塞与非阻塞是设备访问的两种方式.驱动程序需要提供阻塞(等待队列,中断)和非阻塞方式(轮询,异步通知)访问设备.在写阻塞与非阻塞的驱动程序时,经常用到等待队列. 一.阻塞与非阻塞 阻塞调用是没有获得资 ...

  4. c++ 字符串查找函数

    头文件:#include <string.h> 定义函数:int strcasecmp (const char *s1, const char *s2); 函数说明:strcasecmp( ...

  5. java如何填写简历?(干货篇)

        化身孤岛的鲸不才 - 十三夜之月 一份优秀的简历不一定能帮你找到一份满意的工作,但能大大提升你的面试机会. 不容否认,简历是对你的能力.教育和经历的一份简要信息概述. 简历中应该突出你最核心的 ...

  6. 【MFC】断言(ASSERT)的用法

    摘自:Moondark  http://www.cnblogs.com/moondark/archive/2012/03/12/2392315.html 断言(ASSERT)的用法   我一直以为as ...

  7. HihoCoder 1104 : Suzhou Adventure(树形DP)

    Suzhou Adventure 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Little Hi is taking an adventure in Suzhou n ...

  8. mysql数据库备份与还原(转)

    MySQL备份和还原,都是利用mysqldump.mysql和source命令来完成的. 1.Linux下MySQL的备份与还原 1.1 备份 [root@localhost ~]# cd /var/ ...

  9. WS-* 协议

    Web服务作为实现SOA中服务的最主要手段.跟Web Service相关的标准,它们大多以“WS-”作为名字的前缀,所以统称WS-*. Web服务最基本的协议包括UDDI,WSDL和SOAP,通过它们 ...

  10. 浅谈对【OSI七层协议】的理解

    我们每天都在上网冲浪,在这背后到底有那些设备.协议去支撑呢?ISO是[Open System Interconnection]的缩写,该模型定义了不同计算机互联的标准,是设计和描述计算机网络通信的基本 ...