零号智能

  • Python
  • 部署
  • go
  • VPS
  • 运维
  • 生活琐事
  • html
零号智能
Fantasia's blog npc0.com.
  1. 首页
  2. 运维
  3. 正文

apt-get update 和 apt-get install 报错

2021年4月14日 4220点热度 4人点赞 0条评论

W: GPG error: https://repo.huaweicloud.com/debian buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY DCC9EFBF77E11517
E: The repository 'https://repo.huaweicloud.com/debian buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: https://repo.huaweicloud.com/debian buster-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138

如果debian遇到如上错误,可以先apt-key list, 然后依次把key删除,比如查询到如下数据:

pub rsa4096 2012-04-27 [SC] [expired: 2020-04-25]
A1BD 8E9D 78F7 FE5C 3E65 D8AF 8B48 AD62 4692 5553
uid [ expired] Debian Archive Automatic Signing Key (7.0/wheezy) ftpmaster@debian.org

那么执行此命令 root@npc0:~# apt-key del "A1BD 8E9D 78F7 FE5C 3E65 D8AF 8B48 AD62 4692 5553"
OK

清空完所有的key后,去https://ftp-master.debian.org/keys.html下载对应版本的密钥,怎么看当前是什么版本~~

比如/etc/apt/sources.list里面 deb https://repo.huaweicloud.com/debian/ buster main non-free contrib

其中 buster 就是相应版本,如我这下载的就是 Debian 10/buster archive signing key 的文件.

wget下载下来后,执行apt-key add archive-key-10.asc,如果有报错

he key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file has an uns

那么执行 rm /etc/apt/trusted.gpg

最后执行apt-get update看看是否正常

本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2021年5月22日

vpc

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2021 npc0.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

粤ICP备19157245号-1

粤公网安备 44030702002746号