我最近安装了 Kali Linux 2.0 并尝试更新该软件。
这就是我所做的:
我编辑/etc/apt/sources.list
包含以下镜像:
deb http://http.kali.org/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
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana/updates main contrib non-free
deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free
然后运行以下命令:
apt-get clean
apt-get update
运行时apt-get update
,我无法连接到 Kali 服务器。这是错误消息:
Err http://security.kali.org sana/updates InRelease
Err http://http.kali.org sana InRelease
Err http://security.kali.org sana/updates Release.gpg
Unable to connect to kali.mirror.garr.it:http:
Err http://http.kali.org kali-rolling Release.gpg
Unable to connect to kali.mirror.garr.it:http:
Err http://http.kali.org sana Release.gpg
Unable to connect to kali.mirror.garr.it:http:
Segmentation fault Reading package lists... Done
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease
W: Failed to fetch http://http.kali.org/kali/dists/sana/InRelease
W: Failed to fetch http://security.kali.org/kali-security/dists/sana/updates/InRelease
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/Release.gpg
Unable to connect to kali.mirror.garr.it:http:
W: Failed to fetch http://security.kali.org/kali-security/dists/sana/updates/Release.gpg
Unable to connect to kali.mirror.garr.it:http:
W: Failed to fetch http://http.kali.org/kali/dists/sana/Release.gpg
Unable to connect to kali.mirror.garr.it:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.
我该如何修复这个错误?
答案1
你应该切勿修改
sources.list
在卡利Linux中。其中应该包含以下内容:deb http://http.kali.org/kali kali-rolling main contrib non-free # For source package access, uncomment the following line # deb-src http://http.kali.org/kali kali-rolling main contrib non-free
您可能没有连接到互联网。这就是
apt-get update
失败的原因。
答案2
我已经尝试了所有不同类型的存储库,并且当我输入命令 apt-get update 时遇到了各种不同类型的错误.. 将互联网颠倒过来试图找到解决方案.... 事实证明我的组织防火墙一直在拒绝“apt-get”认为它是一个下载管理器。