系统更新报错--NO_PUBKEY

本文介绍了解决Kali Linux在更新过程中遇到的签名验证错误问题的方法,包括重新获取证书、添加额外软件源及修复Ubuntu源签名验证失败等问题。

错误信息

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
W: Some index files failed to download. They have been ignored, or old ones used instead.

网友说是证书签名过期,要重新获取

deb http://http.kali.org/kali kali-rolling main non-free contrib

解决办法

wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add

添加其他源

deb http://http.kali.org/kali kali-rolling main non-free contrib
#ubuntu
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse

因为有些安装包在只ubuntu的源里有,添加后方便安装

执行

sudo apt-get update

报错:

W: GPG error: http://mirrors.aliyun.com/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
E: The repository 'http://mirrors.aliyun.com/ubuntu xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

原因和上面一样

解决

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5

提示

gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/run/user/0/gnupg/d.yxdtz3qfxad3bakdigbecgmf/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr

安装相关依赖:

apt-get install software-properties-common dirmngr

再次

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32

OK
执行

sudo apt-get update

OK

转载于:https://www.cnblogs.com/lanqie/p/8513102.html

zhy@zhy:~$ locale # check for UTF-8 sudo apt update && sudo apt install locales sudo locale-gen en_US en_US.UTF-8 sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 export LANG=en_US.UTF-8 locale # verify settings LANG=zh_CN.UTF-8 LANGUAGE=zh_CN:zh LC_CTYPE="zh_CN.UTF-8" LC_NUMERIC="zh_CN.UTF-8" LC_TIME="zh_CN.UTF-8" LC_COLLATE="zh_CN.UTF-8" LC_MONETARY="zh_CN.UTF-8" LC_MESSAGES="zh_CN.UTF-8" LC_PAPER="zh_CN.UTF-8" LC_NAME="zh_CN.UTF-8" LC_ADDRESS="zh_CN.UTF-8" LC_TELEPHONE="zh_CN.UTF-8" LC_MEASUREMENT="zh_CN.UTF-8" LC_IDENTIFICATION="zh_CN.UTF-8" LC_ALL= 命中:1 http://mirrors.aliyun.com/ubuntu jammy InRelease 命中:2 http://mirrors.aliyun.com/ubuntu jammy-updates InRelease 命中:3 http://mirrors.aliyun.com/ubuntu jammy-backports InRelease 命中:4 http://mirrors.aliyun.com/ubuntu jammy-security InRelease 命中:5 https://packages.microsoft.com/repos/code stable InRelease 获取:6 http://packages.ros.org/ros2/ubuntu jammy InRelease [4,682 B] 错误:6 http://packages.ros.org/ros2/ubuntu jammy InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY F42ED6FBAB17C654 正在读取软件包列表... 完成 W: GPG 错误:http://packages.ros.org/ros2/ubuntu jammy InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY F42ED6FBAB17C654 E: 仓库 “http://packages.ros.org/ros2/ubuntu jammy InRelease” 没有数字签名。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 Generating locales (this might take a while)... en_US.ISO-8859-1... done en_US.UTF-8... done Generation complete. LANG=en_US.UTF-8 LANGUAGE=zh_CN:zh LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
最新发布
07-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值