无法更新。任何调用 apt-get 返回:
中止的软件包列表... 3%。
怎么解决呢?
root@kali:~# apt-get update
Get:1 http://kali.volia.net/kali kali-rolling InRelease [30.5 kB]
Get:2 http://kali.volia.net/kali kali-rolling/main amd64 Packages [15.4 MB]
Get:3 http://kali.volia.net/kali kali-rolling/non-free amd64 Packages [165 kB]
Get:4 http://kali.volia.net/kali kali-rolling/contrib amd64 Packages [109 kB]
Fetched 15.7 MB in 10s (1522 kB/s)
Aborted
Aborted package lists... 95%
root@kali:~# apt-get check
Aborted package lists... 3%
root@kali:~# apt-get install
Aborted package lists... 3%
root@kali:~# uname -a
Linux kali 4.12.0-kali1-amd64 #1 SMP Debian 4.12.6-1kali6 (2017-08-30) x86_64 GNU/Linux
root@kali:~# cat /etc/apt/sources.list
#
# deb cdrom:[Debian GNU/Linux 2017.2 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170917-01:51]/ kali-rolling contrib main non-free
#deb cdrom:[Debian GNU/Linux 2017.2 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170917-01:51]/ kali-rolling contrib main non-free
deb http://http.kali.org/kali kali-rolling main non-free contrib
# deb-src http://http.kali.org/kali kali-rolling main non-free contrib
# deb http://old.kali.org/kali sana main non-free contrib
root@kali:~# apt-cache gencaches
Aborted package lists... 3%
root@kali:~# apt update
Get:1 http://kali.volia.net/kali kali-rolling InRelease [30.5 kB]
Get:2 http://kali.volia.net/kali kali-rolling/main amd64 Packages [15.4 MB]
Fetched 15.4 MB in 12s (1271 kB/s)
Aborted
Aborted package lists... 95%
答案1
线路deb http://http.kali.org/kali kali-rolling main non-free contrib
好像有问题。如果你复制并粘贴其中的一部分,它会绘制一个空白 -http://http.kali.org/kali
存储库看起来现在是 HTTPS
https://www.kali.org/news/kali-linux-repository-https-support/
我会把这条线改为deb https://http.kali.org/kali kali-rolling main non-free contrib
如果你尝试该行的一部分,它会起作用并带你到https://http.kali.org/kali/
答案2
运行rm -rf /var/lib/apt/lists/*
以清除下载列表。发生这种情况是因为下载的软件包列表损坏。我不确定是否有任何命令apt-get
可以删除它们。参考这里。