apt-get 报证书错误处理

更新时间:2025年3月3日 17:15 浏览:82

当在ubuntu中加入了第三方源,没有设置公钥

更新索引的时候就会提示

 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 082AB56BA14FE591
Reading package lists... Done
W: GPG error: http://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/6.2/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 082AB56BA14FE591

类似以上的报警

解决方法

直接设置key

> apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 082AB56BA14FE591

Executing: /tmp/tmp.hwbDmr6VSZ/gpg.1.sh --keyserver
keyserver.ubuntu.com
--recv-keys
082AB56BA14FE591
gpg: requesting key A14FE591 from hkp server keyserver.ubuntu.com
gpg: key A14FE591: public key "Zabbix LLC <packager@zabbix.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

然后再更新,就不会有问题了

导航