本文链接:https://blog.csdn.net/loovejava/article/details/21837935

新安装的Ubuntu在使用sudo apt-get update更新源码的时候出现如下错误:

W: GPG 错误:http://ppa.launchpad.net precise Release: 由于没有公钥,无法验证下列签名: NO_PUBKEY 3EE66BD3F599ACE3
W: GPG 错误:http://ppa.launchpad.net precise Release: 由于没有公钥,无法验证下列签名: NO_PUBKEY 6AF0E1940624A220
W: 无法下载 bzip2:/var/lib/apt/lists/partial/mirrors.163.com_ubuntu_dists_precise_main_binary-i386_Packages  Hash 校验和不符

W: 无法下载 bzip2:/var/lib/apt/lists/partial/mirrors.163.com_ubuntu_dists_precise-security_main_binary-i386_Packages  Hash 校验和不符

W: 无法下载 bzip2:/var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_Packages  Hash 校验和不符

W: 无法下载 bzip2:/var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages  Hash 校验和不符

E: Some index files failed to download. They have been ignored, or old ones used instead.

解决方法很简单,下载导入公钥就行,下载导入key的命令如下:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF0E1940624A220 #此处6AF0E1940624A220需要是错误提示的key

此时继续更新发现没有公钥错误提示,但是还是效验存在问题,此时需要打开软件源的界面,将其他软件选项中的Canpnical合作伙伴/独立等四个选项取消勾选,再执行sudo apt-get update

此时发现可以顺利更新了。

sanbo@ubuntu:~/dev$ sudo apt-get update

搞定收工!

另外送上一个163源,更新的速度挺不错,品种也挺全的:

# deb cdrom:[Ubuntu 12.04.1 LTS _Precise Pangolin_ - Release i386 (20120817.3)]/ precise main restricted
       
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://mirrors.163.com/ubuntu/ precise main restricted
    deb-src http://mirrors.163.com/ubuntu/ precise main restricted
       
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
    deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
       
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://mirrors.163.com/ubuntu/ precise universe
    deb-src http://mirrors.163.com/ubuntu/ precise universe
    deb http://mirrors.163.com/ubuntu/ precise-updates universe
    deb-src http://mirrors.163.com/ubuntu/ precise-updates universe
       
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://mirrors.163.com/ubuntu/ precise multiverse
    deb-src http://mirrors.163.com/ubuntu/ precise multiverse
    deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
    deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse
       
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
       
    deb http://mirrors.163.com/ubuntu/ precise-security main restricted
    deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted
    deb http://mirrors.163.com/ubuntu/ precise-security universe
    deb-src http://mirrors.163.com/ubuntu/ precise-security universe
    deb http://mirrors.163.com/ubuntu/ precise-security multiverse
    deb-src http://mirrors.163.com/ubuntu/ precise-security multiverse
       
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    deb http://archive.canonical.com/ubuntu precise partner
    deb-src http://archive.canonical.com/ubuntu precise partner
       
    ## This software is not part of Ubuntu, but is offered by third-party
    ## developers who want to ship their latest software.
    deb http://extras.ubuntu.com/ubuntu precise main
    deb-src http://extras.ubuntu.com/ubuntu precise main
       
    # codeblock
    deb http://ppa.launchpad.net/pasgui/ppa/ubuntu precise main
    deb-src http://ppa.launchpad.net/pasgui/ppa/ubuntu precise main
       
    # ubuntu tweak
    deb http://ppa.launchpad.net/tualatrix/ppa/ubuntu precise main
    deb-src http://ppa.launchpad.net/tualatrix/ppa/ubuntu precise main

==============================================偶尔时刻还是有各种问题,归纳如下================================================

【缺少公钥】

现象:

sudo apt-get update
    W: GPG error: http://apt.tt-solutions.com dapper Release: 由于没有公钥,下列签名无法进行验证: NO_PUBKEY 06EA41DE4F6C1E86

解决方法:

gpg --keyserver subkeys.pgp.net --recv 4F6C1E86
    gpg --export --armor 4F6C1E86 | sudo apt-key add -

说明:
若缺少其他公钥,则将命令中两处4F6C1E86改为NO_PUBKEY
06EA41DE4F6C1E86中最后8位即可!

如果是Ubuntu PPA的则按照如下方法处理:

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

【签名错解决办法】

情况一.概率出现的问题,这次有,可能下次就没了,可忽略

By simply waiting. This happens at times during archive updates.

情况二.使用如下方法更新:

$ sudo apt-get update -o Acquire::http::No-Cache=True
    或者
    $ sudo apt-get update -o Acquire::BrokenProxy=true

情况三.
现象:

In a particular case this was caused by a broken file and could get fixed using rescue boot and "fsck -fy /" (http://forum.ubuntuusers.de/goto?post=89197 - german)

解决办法:

fsck -fy /

情况四:

现象:

The fix is just to back up sources.list, delete everything in it and run "apt-get update". After the update replace sources.list with the backup and run "apt-get update" again. You should not get the error then.

解决办法:

备份sources.list,然后把sources.list中的东西删空,运行"apt-get update",然后再用刚刚的备份将"apt-get update"复原,再运行"apt-get update"。

情况五.主旨就是清理缓存

sudo bash
     
    apt-get clean
    cd /var/lib/apt
    mv lists lists.old
    mkdir -p lists/partial
    apt-get clean
    apt-get update

情况六.缓存代理服务器导致的问题:

如下内容添加到/etc/apt/apt.conf.d/10broken_proxy文件里试试看。

Acquire::http::No-Cache "true";
    Acquire::http::Max-Age "0";

情况七

sudo apt-get install medibuntu-keyring
————————————————
版权声明:本文为CSDN博主「sanbo_xyz」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/loovejava/article/details/21837935

更新linux时候提示“由于没有公钥,无法验证下列签名".的更多相关文章

  1. 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 ...

  2. 乌班图14更新软件提示错误:https://mirrors.aliyun.com kubernetes-xenial InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 6A030B21BA07F4FB

    提示如下 获取: https://mirrors.aliyun.com kubernetes-xenial InRelease 忽略 https://mirrors.aliyun.com kubern ...

  3. linux umount 提示device is busy 的解决

    linux umount 提示"device is busy" 终极解决 为了干净地关闭或热交换 UNIX 或类 UNIX 系统上的存储硬件,必须能够卸载使用此设备上的存储的所有文件系统.但是,如果正 ...

  4. vs2010 更新jQuery智能提示包

    vs2010 更新jQuery只能提示包时,可以直接在NuGet中更新 jquery-2.1.0-vsdoc.js jquery-2.1.0.js jquery-2.1.0.min.js jquery ...

  5. VMware: linux起步提示 memory for crashkernel(0*0 to 0*0)not within permissible

    (virtualbox/VMware)linux起步提示memoryforcrashkernel(0*0 to 0*0)notwithinpermissible  http://www.myexcep ...

  6. ODBC更新记录集提示”记录集为只读“

    创建的ODBC应用程序默认的记录集不具有只读属性,但是再更新记录表时会提示”记录集为只读“,这是为什么呢? 今天看书找到了答案: 因为MFC中的数据库类不支持需要连接两个或者多个表的记录集更新,如果选 ...

  7. Linux yum提示Loaded plugins错误的解决方法

    yum是Linux软件包管理器,也叫yum源,在yum使用过程中,有时会出现Loaded plugins错误,重启无效,遇到这种情况该如何解决呢?下面就给大家介绍下Linux yum提示Loaded ...

  8. linux shell提示输入 输错字符解决方法

    linux shell提示输入 输错字符解决方法ctrl+回车 删除单个字符ctrl+u删除光标前全部字符ctrl+k删除光标后全部字符

  9. macOS 更新 git 命令提示 xcrun,.gitignore 配置不生效问题。

    macOS 更新 运行git提示xcrun: error: invalid active developer path 在终端输入 xcode-select --install 即可以解决该问题 .g ...

随机推荐

  1. SQL SERVER数据库批量替换某个数据表里的数据update

    批量替换:将A表CMC里面所有包含a替换成b而不影响其他内容UPDATE A SET CMC=REPLACE(CMC,'a','b')

  2. 本人亲测-SSM整合后的基础包(供新手学习使用,可在本基础上进行二次开发)

    本案例是在eclipse上进行开发的,解压后直接添加到eclipse即可.还需要自己配置maven环境.链接:https://pan.baidu.com/s/1siuvhCJASuZG_jqY5utP ...

  3. Django-admin站点管理的详细使用

    使用Django的管理模块,需要按照如下步骤操作: 管理界面本地化 创建管理员 注册模型类 自定义管理页面 1 管理界面本地化 在settings.py中设置语言和时区 LANGUAGE_CODE = ...

  4. 支撑微博亿级社交平台,小白也能玩转Redis集群(原理篇)

    Redis作为一款性能优异的内存数据库,支撑着微博亿级社交平台,也成为很多互联网公司的标配.这里将以Redis Cluster集群为核心,基于最新的Redis5版本,从原理再到实战,玩转Redis集群 ...

  5. [BZOJ3550] [Sdoi2014]数数

    Description 我们称一个正整数N是幸运数,当且仅当它的十进制表示中不包含数字串集合S中任意一个元素作为其子串.例如当S=(22,333,0233)时,233是幸运数,2333.20233.3 ...

  6. [USACO10NOV]奶牛的图片Cow Photographs

    题目描述 Farmer John希望给他的N(1<=N<=100,000)只奶牛拍照片,这样他就可以向他的朋友炫耀他的奶牛. 这N只奶牛被标号为1..N. 在照相的那一天,奶牛们排成了一排 ...

  7. 解决连接oracle报错 尝试加载Oracle客户端库时引发BadImageFomatException。如果在安装64位Oracle客户端组件的情况下以32位模式运行,将出现此问题的报错。

    最近遇到一个.NET连接Oracle的一个错误,其主要原因是换了一台电脑,在新电脑上运行以前的项目出现了的一个错误,工作环境为vs2017+Oracle 64位,win10系统 这个错误头疼了一天,找 ...

  8. HDU 1506 Largest Rectangle in a Histogram(区间DP)

    题目网址:http://acm.hdu.edu.cn/showproblem.php?pid=1506 题目: Largest Rectangle in a Histogram Time Limit: ...

  9. 【原】centos上安装newman

    1.安装node/npm 1.Newman(因为Newman是node编写,需要依赖nodejs):可以使用先下载安装包到 /usr/local路径下 /usr/local# wget https:/ ...

  10. 使用JRebel插件实现SpringBoot应用代码热加载

    前言 在实际的开发过程中,我们经常修改代码之后,手动的重启项目,查看修改效果.那么有没有一种方式能够快速的.自动的帮我们将修改代码自动更新,避免手动重启,从而提高开发效率呢?是有的,在我之前的文章里面 ...