ubuntu apt update报错:由于没有公钥,无法验证下列签名

问题

在sudo apt update 操作时,出现以下问题,各种换源、换网络都不好使

命中:1 http://mirrors.ustc.edu.cn/ubuntu xenial InRelease
忽略:2 http://dl.google.com/linux/chrome/deb stable InRelease                                     
命中:3 http://archive.ubuntukylin.com:10006/ubuntukylin xenial InRelease                          
命中:4 http://packages.microsoft.com/repos/vscode stable InRelease                                
获取:5 http://dl.google.com/linux/chrome/deb stable Release [943 B]                               
获取:6 http://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]                           
错误:6 http://dl.google.com/linux/chrome/deb stable Release.gpg                                   
  由于没有公钥,无法验证下列签名: NO_PUBKEY 78BD65473CB3BD13
命中:7 http://packages.osrfoundation.org/gazebo/ubuntu-stable xenial InRelease                    
命中:8 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial InRelease                
获取:9 http://packages.ros.org/ros/ubuntu xenial InRelease [4,678 B]                              
命中:10 http://ppa.launchpad.net/peek-developers/stable/ubuntu xenial InRelease
错误:9 http://packages.ros.org/ros/ubuntu xenial InRelease                                        
  由于没有公钥,无法验证下列签名: NO_PUBKEY F42ED6FBAB17C654
获取:11 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial InRelease [17.5 kB]     
忽略:11 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial InRelease               
命中:12 http://ppa.launchpad.net/xqms/opencv-nonfree/ubuntu xenial InRelease
获取:13 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial Release [17.2 kB]
获取:14 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial Release.gpg [299 B]
忽略:14 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial Release.gpg
正在读取软件包列表... 完成       
W: 校验数字签名时出错。此仓库未被更新,所以仍然使用此前的索引文件。GPG 错误:http://dl.google.com/linux/chrome/deb stable Release: 由于没有公钥,无法验证下列签名: NO_PUBKEY 78BD65473CB3BD13
W: 校验数字签名时出错。此仓库未被更新,所以仍然使用此前的索引文件。GPG 错误:http://packages.ros.org/ros/ubuntu xenial InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY F42ED6FBAB17C654
W: GPG 错误:http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial Release: 由于没有公钥,无法验证下列签名: NO_PUBKEY 2CC98497A1231595
E: 仓库 “http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial Release” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

解决

进行如下操作:

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

#此处6AF0E1940624A220需要是上面错误提示的那些key
错几个key就这么加几回

然后就可以开心的update了,成功的样子长这样:

忽略:1 http://dl.google.com/linux/chrome/deb stable InRelease
命中:2 http://archive.ubuntukylin.com:10006/ubuntukylin xenial InRelease                          
命中:3 http://packages.microsoft.com/repos/vscode stable InRelease                                
获取:4 http://dl.google.com/linux/chrome/deb stable Release [943 B]                               
获取:5 http://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]                           
获取:6 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,136 B]                 
命中:7 http://packages.osrfoundation.org/gazebo/ubuntu-stable xenial InRelease                    
命中:8 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial InRelease                      
命中:10 http://ppa.launchpad.net/peek-developers/stable/ubuntu xenial InRelease                   
命中:12 http://ppa.launchpad.net/xqms/opencv-nonfree/ubuntu xenial InRelease                      
获取:11 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial InRelease [17.5 kB]     
获取:9 http://packages.ros.org/ros/ubuntu xenial InRelease [4,678 B]                              
命中:13 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main amd64 Packages     
忽略:13 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main amd64 Packages     
获取:14 http://packages.ros.org/ros/ubuntu xenial/main amd64 Packages [827 kB]                    
命中:15 http://mirrors.ustc.edu.cn/ubuntu xenial InRelease                                        
获取:16 http://packages.ros.org/ros/ubuntu xenial/main i386 Packages [599 kB]                     
命中:17 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main i386 Packages
忽略:17 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main i386 Packages      
命中:18 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main Translation-en     
忽略:18 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main Translation-en     
忽略:18 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main Translation-en     
命中:13 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main amd64 Packages
忽略:13 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main amd64 Packages     
命中:17 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main i386 Packages      
忽略:17 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main i386 Packages      
获取:18 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main Translation-en [424 B]
命中:13 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main amd64 Packages     
命中:17 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu xenial/main i386 Packages      
已下载 1,139 kB,耗时 4分 57秒 (3,828 B/s)                                                        
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
有 371 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。

接下来就是开心的

sudo apt upgrade
  • 11
    点赞
  • 34
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值