当前位置:首页 » 《关于电脑》 » 正文

解决办法:gpg: 从公钥服务器接收失败:无数据

26 人参与  2024年05月04日 09:15  分类 : 《关于电脑》  评论

点击全文阅读


错误原因:由于要下载一些安装包,在进行sudo apt update的时候出现了如下错误。

 终端输入:sudo apt update
 
命中:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy InRelease
命中:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates InRelease                                                                                                            
命中:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports InRelease                                                                                                          
获取:4 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]                                                                                                            
忽略:5 https://www.scootersoftware.com bcompare4 InRelease                                                                                                       
获取:6 https://www.scootersoftware.com bcompare4 Release [1,717 B]                                                                                               
获取:7 https://www.scootersoftware.com bcompare4 Release.gpg [836 B]                                                                                                    
忽略:7 https://www.scootersoftware.com bcompare4 Release.gpg                                                                                                                  
忽略:8 https://deepin-wine.i-m.dev  InRelease                                                                                                
命中:9 https://deepin-wine.i-m.dev  Release                                 
命中:10 https://dl.google.com/linux/chrome/deb stable InRelease
忽略:11 https://deepin-wine.i-m.dev  Release.gpg
正在读取软件包列表... 完成
W: GPG 错误:https://www.scootersoftware.com bcompare4 Release: 由于没有公钥,无法验证下列签名: NO_PUBKEY EC34ED227AFAE3F2
E: 仓库 “https://www.scootersoftware.com bcompare4 Release” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
 

然后在网上查说是要添加公钥

 sudo apt-key adv --keyserver keyserver.ubundu.com --recv-keys EC34ED227AFAE3F2

输入以上命令一直会报错

gpg: 从公钥服务器接收失败:无数据

其实这个问题从一开始就弄错了,不能盲目的看到NO_PUBKEY就去添加。因该仔细分析报错的日志。

主要的报错原因如下:

W: GPG 错误:https://www.scootersoftware.com bcompare4 Release: 由于没有公钥,无法验证下列签名: NO_PUBKEY EC34ED227AFAE3F2
E: 仓库 “https://www.scootersoftware.com bcompare4 Release” 没有数字签名。

他的意思是你的源里面有一个仓是没有数字签名的,你需要去你的源文件里面查是否有这个仓。

 sudo nano /etc/apt/sources.list

在打开的文件中,查找包含 "Scooter Software - Home of Beyond Compare" 的行。该行可能是以 "deb" 或 "deb-src" 开头,后面跟着仓库的 URL。

如果在你的sources.list里面没有 找的这个仓,那么这个仓很有可能被添加到其他文件了。你需要到/etc/apt/sources.list.d/ 目录下去查看。

 ls /etc/apt/sources.list.d/


archive_uri-https_apt_repos_intel_com_mkl-jammy.list               deepin-wine.i-m.dev.list       google-chrome.list                                                                        scootersoftware.list
archive_uri-https_apt_repos_intel_com_mkl-jammy.list.save     deepin-wine.i-m.dev.list.save google-chrome.list.save  scootersoftware.list.save

很显然那,我的目录下多了scootersoftware.list和scootersoftware.list.save这两个文件。进入文件看果然看到了https://www.scootersoftware.com这个仓。

直接

sudo rm /etc/apt/sources.list.d/scootersoftware.list /etc/apt/sources.list.d/scootersoftware.list.save

删除这两个文件就行了,再次进行

sudo apt update


点击全文阅读


本文链接:http://zhangshiyu.com/post/103387.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1