apt-get 更新失败

apt-get 更新失败

sudo apt-get update尝试在 Kali 虚拟机上运行时收到以下消息。可能是什么原因?

root@kali:~# sudo apt-get update
Get:1 http://http.kali.org/kali kali-rolling InRelease [3,415 B]
Err:1 http://http.kali.org/kali kali-rolling InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Reading package lists... Done       
E: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://http.kali.org/kali kali-rolling InRelease' is no longer 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.
root@kali:~#
# cat /etc/resolv.conf
# Generated by NetworkManager
search *omitted*.com
nameserver 192.168.10.240
nameserver 192.168.32.215

答案1

编辑您的并在第一个中/etc/apt/sources.list添加:shttp

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

希望这可以帮助

答案2

我通过使用 nano 类型从 http 更改为 https 来解决:nano /etc/apt/sources.list 然后:将 url 从 http:// 更改为 https://

答案3

对我来说,在 http 中添加 's' 是行不通的,事实上,Kali 不使用 https。然而,我发现我的互联网提供商阻止了这个网站“kali.org”,因为我选择了“开启”儿童安全功能。一旦我通过登录我的互联网提供的帐户将其网站上的“kali.org”列入白名单。一切顺利,没有任何错误。

相关内容