soarli

Kali更新源证书无效解决方案
更新源vim /etc/apt/sources.list任选一个加到文件末尾即可。 #中科大 deb http:/...
扫描右侧二维码阅读全文
09
2021/05

Kali更新源证书无效解决方案

更新源

vim /etc/apt/sources.list

任选一个加到文件末尾即可。


#中科大
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
 
#阿里云
deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
 
#清华大学
deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
 
#浙大
deb http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free
deb-src http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free
 
#东软大学
deb http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib
deb-src http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib
 
#官方源
deb http://http.kali.org/kali kali-rolling main non-free contrib

保存之后执行

apt-get update && apt-get upgrade && apt-get dist-upgrade
apt-get clean

如果出现数字签名无效的情况,就下载签名:

wget archive.kali.org/archive-key.asc   //下载签名
 
apt-key add archive-key.asc   //安装签名
root@kali:/var/lib/apt# sudo apt-get update
获取:1 http://mirrors.ustc.edu.cn/kali kali-rolling InRelease [30.5 kB]
错误:1 http://mirrors.ustc.edu.cn/kali kali-rolling InRelease
  下列签名无效: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
正在读取软件包列表... 完成   
W: GPG 错误:http://mirrors.ustc.edu.cn/kali kali-rolling InRelease: 下列签名无效: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
E: 仓库 “http://mirrors.ustc.edu.cn/kali kali-rolling InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

Ubuntu源备份:

# deal Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted multiverse universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe

某个依赖包无法被安装的解决方案:传送门

本次遇到的kali问题最终使用remove方法得以解决。

参考资料:

https://www.jianshu.com/p/e3fdd3afc0b4

最后修改:2022 年 01 月 07 日 05 : 49 PM

发表评论