[Share Experiences] 还在为没有公钥导致的无法更新而烦恼吗?这里有解决方案
Tofloor
poster avatar
deepin-superuser
deepin
2022-05-19 19:46
Author

很多时候,我们添加第三方源或者安装了第三方软件后,系统无法更新。终端里执行 sudo apt update 时提示 由于没有公钥,无法验证下列签名: NO_PUBKEY XXXXXXXX

image.png

这时,我们就需要这条命令了,可以一键解决上边的问题

sudo apt update 2>/dev/null | awk 'match($0, /NO_PUBKEY\ (\w{16})/, a) {print a[1]}' | sort | uniq | xargs sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 

使用效果如下

image.png

再次更新即可

Reply Favorite View the author
All Replies
liwl
deepin
2022-05-19 19:47
#1

agree

agree

agree

Reply View the author
神末shenmo
Moderator
Spark-App
2022-05-19 21:39
#2

可以封装成key修复了

Reply View the author
deepin-superuser
deepin
2022-05-19 22:23
#3
神末shenmo

可以封装成key修复了

我觉得可以集成到控制中心里

Reply View the author
babyfengfjx
Super Moderator
CQA
2022-05-19 23:08
#4

牛皮啊!

Reply View the author
逸·文鹤ᵀⁱᵐᵉ ᴰᵃⁿᶜᵉʳ
deepin
2022-06-22 03:04
#5

666

Reply View the author
中雨
deepin
2022-06-27 21:43
#6

66666

Reply View the author