首先,我在尝试安装新软件包时遇到以下错误。
sudo apt-get install mpack
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
mail-transport-agent inews
The following NEW packages will be installed:
mpack
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 36.4 kB of archives.
After this operation, 93.2 kB of additional disk space will be used.
Err:1 http://http.kali.org/kali kali-rolling/main amd64 mpack amd64 1.6-8.2
404 Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/m/mpack/mpack_1.6-8.2_amd64.deb 404 Not Found [IP: 192.99.200.113 80]
这是这只是众多软件包中的一个例子我尝试安装。但都失败了,并出现相同的错误(获取旧的不存在的软件包版本)
我注意到该错误表示我无法访问“http://http.kali.org/kali/pool/main/m/mpack/mpack_1.6-8.2_amd64.deb”(在最后一行)
于是,我尝试直接在浏览器上访问该URL,却得到了404 not find。接下来我做的就是在URL上退一步,所以我去了“http://http.kali.org/kali/pool/main/m/mpack/”,发现没有这个“mpack_1.6-8.2_amd64.deb”版本。我的kali应该获取的文件是“mpack_1.6-17_amd64.deb”(它位于 mpack 路径上)
我确认我有正确的sources.list 文件并运行了 apt 更新。
我的sources.list包含这两行应该是正确的,不应该是这里的问题。
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main contrib non-free
我运行了很多次的命令是:
apt update
apt-get update
sudo apt update
sudo apt-get update
所以我很困惑为什么我的kali仍然不断获取它不存在的旧包,并向我抛出错误404未找到?
或者有人遇到过同样的问题吗?
sudo apt update
结果:
$ sudo apt update
Get:1 http://mirror.kku.ac.th/kali kali-rolling InRelease [30.5 kB]
Get:2 http://mirror.kku.ac.th/kali kali-rolling/non-free Sources [135 kB]
Get:3 http://mirror.kku.ac.th/kali kali-rolling/main Sources [12.7 MB]
Get:4 http://mirror.kku.ac.th/kali kali-rolling/contrib Sources [63.7 kB]
Get:5 http://mirror.kku.ac.th/kali kali-rolling/main amd64 Packages [17.1 MB]
Get:6 http://mirror.kku.ac.th/kali kali-rolling/main amd64 Contents (deb) [36.3 MB]
Get:7 http://mirror.kku.ac.th/kali kali-rolling/contrib amd64 Packages [105 kB]
Get:8 http://mirror.kku.ac.th/kali kali-rolling/contrib amd64 Contents (deb) [105 kB]
Get:9 http://mirror.kku.ac.th/kali kali-rolling/non-free amd64 Packages [188 kB]
Get:10 http://mirror.kku.ac.th/kali kali-rolling/non-free amd64 Contents (deb) [911 kB]
Fetched 67.7 MB in 8s (8,332 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
答案1
镜像http://mirror.kku.ac.th/kali
已过时,提供旧版本mpack_1.6-8.2
。您可以选择不同的镜子卡利镜子。
使用以下命令:
printf "%s\n" "deb http://mirror.easylee.nl/kali/ kali-rolling main non-free contrib" |\
sudo tee /etc/apt/sources.list
sudo apt update
sudo apt install mpack