在密钥导入失败后如何成功实现sudo apt-get update

在密钥导入失败后如何成功实现sudo apt-get update

情况简介

在换源后使用sudo apt-get update发现出现了报出由于没有公钥,无法验证下列签名: NO_PUBKEY的错误,在查阅了大量的资料以后,都是使用sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys来的导入密钥,导入成功之后就可以使用sudo apt-get update来更新了,但是我的问题是无法导入密钥,会出现下面这样的错误

Executing: /tmp/apt-key-gpghome.kl8yx674H2/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys xxxxxxxx
gpg: 密钥 xxxxxxxxxx:“Valve Corporation <linux@steampowered.com>” 未改变
gpg: 处理的总数:1
gpg:              未改变:1

在多次查找资料接近破防的时候,最后今天终于解决了这个问题,所以就想把这个问题写一下,让后面的人一下子就可以解决,不用再像我一样打开几十个页面了。

解决方法

根据我们在使用sudo apt-get update的报错来解决
比如说我的报错内容是

获取:1 file:/var/cudnn-local-repo-ubuntu2004-8.8.0.121  InRelease [1,572 B]
获取:1 file:/var/cudnn-local-repo-ubuntu2004-8.8.0.121  InRelease [1,572 B]
命中:2 http://mirrors.aliyun.com/docker-ce/linux/ubuntu focal InRelease                                                                                                                                                  
命中:3 https://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                                                           
命中:4 http://packages.microsoft.com/repos/code stable InRelease                                                                                                                                                         
命中:6 https://download.docker.com/linux/ubuntu focal InRelease                                                                                                                                                          
命中:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease                                                                                                                                                
命中:7 http://mirrors.aliyun.com/ubuntu bionic InRelease                                                                                                                                                                 
命中:8 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease                                                                                                                                                        
命中:9 https://packages.microsoft.com/repos/edge stable InRelease                                                                                                                                                        
命中:10 http://mirrors.aliyun.com/ubuntu bionic-security InRelease                                                                                                                                                       
命中:11 http://security.ubuntu.com/ubuntu focal-security InRelease                                                                                                                                          
命中:12 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal InRelease                                                                                                           
命中:13 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease                                                                                        
命中:14 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease                                                        
获取:15 https://repo.steampowered.com/steam stable InRelease [2,861 B]                                         
命中:16 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease                                                           
错误:15 https://repo.steampowered.com/steam stable InRelease                              
  由于没有公钥,无法验证下列签名: NO_PUBKEY F24AEA9FB05498B7
忽略:17 https://repo.nordvpn.com/deb/nordvpn/debian stable InRelease 
错误:18 http://typora.io linux/ InRelease                                                                                                                                                                                
  连接失败 [IP: 198.18.0.58 80]
错误:19 https://repo.nordvpn.com/deb/nordvpn/debian stable Release                                                                                                                                                       
  Could not handshake: Error in the pull function. [IP: 198.18.0.18 443]
正在读取软件包列表... 完成                                                                                                                                                                                               
W: GPG 错误:https://repo.steampowered.com/steam stable InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY F24AEA9FB05498B7
E: 仓库 “https://repo.steampowered.com/steam stable InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “https://repo.nordvpn.com/deb/nordvpn/debian stable Release” 不再含有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

可以发现我们的没有公钥的错误是出现在https://repo.steampowered.com/steam stable InRelease 上,那我们就可以在source.list上面找到这个网址并注释掉
如果说你的source.list上面并没有这样的网址,那么就执行

cd /etc/apt/sources.list.d/

然后使用ls,一定是可以找到和这个有关的文件的
比如我的
在这里插入图片描述
就可以看到steam-stable.list,那么我们就可以把其中的结果注释掉。
最后就可以成功的update啦
!!!!
在这里插入图片描述

  • 5
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

菜狗原来是我自己

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值