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. LeetCode OJ:Majority Element(主要元素)

    Given an array of size n, find the majority element. The majority element is the element that appear ...

  2. LeetCode OJ :Move Zeroes (移动0)

    Given an array nums, write a function to move all 0's to the end of it while maintaining the relativ ...

  3. 剑指offer--26.顺时针打印矩阵

    1,2,3,45,6,7,88,10,11,1213,14,15,16 每次输出第一行,然后删除第一行,逆时针旋转剩下的矩阵. ------------------------------------ ...

  4. IDEA导出想要的sql供H2数据库使用

    通过Database连接远程oracle数据库. 选择对应的数据库 双击该数据库需要查询的表,进行自动查询,展示结果. 在查询结果中选择某条数据,右键,选择Data Executer,选择对应的方式. ...

  5. flask中cookie和session介绍

    flask中cookie和session介绍 一.cookie: 在网站中,http请求是无状态的.也就是说即使第一次和服务器连接后并且登录成功后,第二次请求服务器依然不能知道当前请求是哪个用户.co ...

  6. Pipeline处理Dataflow

    Pipeline处理Dataflow https://www.cnblogs.com/CoderAyu/p/9757389.html .Net Core中利用TPL(任务并行库)构建Pipeline处 ...

  7. JDBC 1 利用Statement对数据库进行增删改查

    准备工作 1新建po类:User private int id; private String name; private String pwd; set,get方法省略 2  新建UserDao类, ...

  8. LeetCode Split Array into Consecutive Subsequences

    原题链接在这里:https://leetcode.com/problems/split-array-into-consecutive-subsequences/description/ 题目: You ...

  9. loj #6138. 「2017 山东三轮集训 Day4」Right

    题目: 题解: 暴力一波 \(SG\) 函数可以发现这么一个规律: \(p\) 为奇数的时候 : \(SG(n) = n \% 2\) \(p\) 为偶数的时候 : \(SG(n) = n \% (p ...

  10. win10开始键点击无效果

    1.在键盘上按下win+R键,或在开始菜单图标上点击右键选择运行: 2.输入powershell,按下“确定”运行:3.在窗口里输入或复制粘贴以下命令,注意只有一行: Get-AppxPackage ...