kali linux 2.0配置更新源后apt-get update 报错

时间:2022-11-15 07:19:45

这个是我/etc/apt/sources.list的更新源:

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

配置好之后apt-get update报错如下:

 root@kali:~# apt-get update
Get: http://old.kali.org/kali sana InRelease [20.3 kB]
Get: http://mirrors.neusoft.edu.cn/kali kali-rolling InRelease [30.5 kB]
Err: http://old.kali.org/kali sana InRelease
The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
Err: http://mirrors.neusoft.edu.cn/kali kali-rolling InRelease
The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
Reading package lists... Done
W: GPG error: http://old.kali.org/kali sana InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
E: The repository 'http://old.kali.org/kali sana 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() manpage for repository creation and user configuration details.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://mirrors.neusoft.edu.cn/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>

经google查找解决方式,得到国外大佬给出的解决方案:

https://forums.kali.org/showthread.php?38858-apt-get-update-GPG-error-key-expired

 apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 7D8D0BF6

再次apt-get update就没问题了