如何修复 kali linux 上的连接超时?

如何修复 kali linux 上的连接超时?
┌──(kali㉿kali)-[~]
└─$ sudo apt-get update         
[sudo] password for kali: 
Get:1 http://deb.i2p2.no unstable InRelease [19.7 kB]
Ign:2 http://http.kali.org/kali kali-rolling InRelease                                                              
Ign:2 http://http.kali.org/kali kali-rolling InRelease
Ign:2 http://http.kali.org/kali kali-rolling InRelease
Err:2 http://http.kali.org/kali kali-rolling InRelease
  Could not connect to http.kali.org:80 (192.99.200.113), connection timed out
Fetched 19.7 kB in 37s (527 B/s)
Reading package lists... Done
W: http://deb.i2p2.no/dists/unstable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  Could not connect to http.kali.org:80 (192.99.200.113), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.

答案1

我遇到了同样的错误,并尝试替换 /etc/apt/sources.list 中存在的默认存储库...我在 VM 上运行 kali,甚至尝试多次重新安装 kali...经过大量的挫折和研究,​​这终于为我找到了有效的解决方案...

步骤 1. 打开终端并输入.... sudo nano /etc/apt/sources.list

步骤 2. 删除其中的所有内容(您可能已经读过不要篡改此文件,因为它可能导致 kali 无法正常运行......但无论如何您有什么损失)

步骤3.放入这些镜像存储库...

 deb http://kali.cs.nctu.edu.tw/kali kali-rolling main non-free contrib
#deb http://http.kali.org/kali kali-rolling main contrib non-free
#deb-src http://http.kali.org/kali kali-rolling main contrib non-free

步骤 4. 保存并输入 sudo apt update

希望这可以帮助

相关内容