使用kali 系统运行apt-get update时,报了如下错误:
root@DESKTOP-JF4DS4A:/home/doulicau# apt-get update
Get:1 http://mirrors.neusoft.edu.cn/kali kali-rolling InRelease [30.5 kB]
Err:1 http://mirrors.neusoft.edu.cn/kali kali-rolling InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
Reading package lists... Done
W: GPG error: http://mirrors.neusoft.edu.cn/kali kali-rolling InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
E: The repository 'http://http.kali.org/kali kali-rolling 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.
解决方法1:
wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add
解决方法2:
apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys ED444FF07D8D0BF6
dpkg --configure -a
解决方法3:
用以上方法重设密钥提示:
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
这下提示gnupg没装,于是需要我们安装:
apt-get install gnupg
但是由于源没更新,索引仍然无法获得,apt无法安装gbupg的包(死循环了)
所以我们直接强行获取密钥:
wget http://http.kali.org/pool/main/k/kali-archive-keyring/kali-archive-keyring_2020.2_all.deb
apt install ./kali-archive-keyring_2020.2_all.deb
但是可能会提示 ERROR: The certificate of 'mirrors.neusoft.edu.cn' is not trusted.
这时需要在wget里加参数 --no-check-certificate,也就是键入
wget http://http.kali.org/pool/main/k/kali-archive-keyring/kali-archive-keyring_2020.2_all.deb --no-check-certificate
然后安装
apt install ./kali-archive-keyring_2020.2_all.deb
就行了。