我有一个干净的安装kali-2.0.1-rpi.img在 Raspberry Pi B+ 上。它通过电缆连接到 mac,并且网络正常工作:我可以打开网页并从 pi ping ip。以 root 身份启动并登录后,当我尝试更新软件包时,我只收到错误消息,指出找不到文件。
root@kali: apt-get update
Ign http://security.kali.org sana/updates InRelease
Ign http://security.kali.org sana/updates Release.gpg
Ign http://http.kali.org sana InRelease
Ign http://http.kali.org sana Release.gpg
Ign http://security.kali.org sana/updates Release
Ign http://http.kali.org sana Release
Ign http://security.kali.org sana/updates/main armel Packages/DiffIndex
Ign http://security.kali.org sana/updates/contrib armel Packages/DiffIndex
Ign http://security.kali.org sana/updates/non-free armel Packages/DiffIndex
Err http://http.kali.org sana/main Sources
404 Not Found
Err http://security.kali.org sana/updates/main Sources
404 Not Found
Err http://security.kali.org sana/updates/contrib Sources
404 Not Found
Err http://http.kali.org sana/non-free Sources
404 Not Found
Err http://http.kali.org sana/contrib Sources
404 Not Found
Err http://security.kali.org sana/updates/non-free Sources
404 Not Found
Err http://http.kali.org sana/main armel Packages
404 Not Found
Err http://http.kali.org sana/non-free armel Packages
404 Not Found
Err http://http.kali.org sana/contrib armel Packages
404 Not Found
Ign http://security.kali.org sana/updates/contrib Translation-en
Ign http://http.kali.org sana/contrib Translation-en
Ign http://security.kali.org sana/updates/main Translation-en
Ign http://http.kali.org sana/main Translation-en
Ign http://security.kali.org sana/updates/non-free Translation-en
Ign http://http.kali.org sana/non-free Translation-en
Err http://security.kali.org sana/updates/main armel Packages
404 Not Found
Err http://security.kali.org sana/updates/contrib armel Packages
404 Not Found
Err http://security.kali.org sana/updates/non-free armel Packages
404 Not Found
W: Failed to fetch http://security.kali.org/kali-security/dists/sana/updates/main/source/Sources 404 Not Found
W: Failed to fetch http://security.kali.org/kali-security/dists/sana/updates/contrib/source/Sources 404 Not Found
W: Failed to fetch http://security.kali.org/kali-security/dists/sana/updates/non-free/source/Sources 404 Not Found
W: Failed to fetch http://http.kali.org/kali/dists/sana/main/source/Sources 404 Not Found
W: Failed to fetch http://http.kali.org/kali/dists/sana/non-free/source/Sources 404 Not Found
W: Failed to fetch http://http.kali.org/kali/dists/sana/contrib/source/Sources 404 Not Found
W: Failed to fetch http://http.kali.org/kali/dists/sana/main/binary-armel/Packages 404 Not Found
W: Failed to fetch http://http.kali.org/kali/dists/sana/non-free/binary-armel/Packages 404 Not Found
W: Failed to fetch http://http.kali.org/kali/dists/sana/contrib/binary-armel/Packages 404 Not Found
W: Failed to fetch http://security.kali.org/kali-security/dists/sana/updates/main/binary-armel/Packages 404 Not Found
W: Failed to fetch http://security.kali.org/kali-security/dists/sana/updates/contrib/binary-armel/Packages 404 Not Found
W: Failed to fetch http://security.kali.org/kali-security/dists/sana/updates/non-free/binary-armel/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
如果我检查apt-get
正在寻找哪些文件
root@kali:~# apt-get update --print-uris
'http://security.kali.org/kali-security/dists/sana/updates/main/source/Sources.bz2' security.kali.org_kali-security_dists_sana_updates_main_source_Sources 0 :
'http://security.kali.org/kali-security/dists/sana/updates/contrib/source/Sources.bz2' security.kali.org_kali-security_dists_sana_updates_contrib_source_Sources 0 :
'http://security.kali.org/kali-security/dists/sana/updates/non-free/source/Sources.bz2' security.kali.org_kali-security_dists_sana_updates_non-free_source_Sources 0 :
'http://security.kali.org/kali-security/dists/sana/updates/main/binary-armel/Packages.bz2' security.kali.org_kali-security_dists_sana_updates_main_binary-armel_Packages 0 :
'http://security.kali.org/kali-security/dists/sana/updates/contrib/binary-armel/Packages.bz2' security.kali.org_kali-security_dists_sana_updates_contrib_binary-armel_Packages 0 :
'http://security.kali.org/kali-security/dists/sana/updates/non-free/binary-armel/Packages.bz2' security.kali.org_kali-security_dists_sana_updates_non-free_binary-armel_Packages 0 :
'http://security.kali.org/kali-security/dists/sana/updates/contrib/i18n/Translation-en.bz2' security.kali.org_kali-security_dists_sana_updates_contrib_i18n_Translation-en 0 :
'http://security.kali.org/kali-security/dists/sana/updates/main/i18n/Translation-en.bz2' security.kali.org_kali-security_dists_sana_updates_main_i18n_Translation-en 0 :
'http://security.kali.org/kali-security/dists/sana/updates/non-free/i18n/Translation-en.bz2' security.kali.org_kali-security_dists_sana_updates_non-free_i18n_Translation-en 0 :
'http://security.kali.org/kali-security/dists/sana/updates/InRelease' security.kali.org_kali-security_dists_sana_updates_InRelease 0
'http://http.kali.org/kali/dists/sana/main/source/Sources.bz2' http.kali.org_kali_dists_sana_main_source_Sources 0 :
'http://http.kali.org/kali/dists/sana/non-free/source/Sources.bz2' http.kali.org_kali_dists_sana_non-free_source_Sources 0 :
'http://http.kali.org/kali/dists/sana/contrib/source/Sources.bz2' http.kali.org_kali_dists_sana_contrib_source_Sources 0 :
'http://http.kali.org/kali/dists/sana/main/binary-armel/Packages.bz2' http.kali.org_kali_dists_sana_main_binary-armel_Packages 0 :
'http://http.kali.org/kali/dists/sana/non-free/binary-armel/Packages.bz2' http.kali.org_kali_dists_sana_non-free_binary-armel_Packages 0 :
'http://http.kali.org/kali/dists/sana/contrib/binary-armel/Packages.bz2' http.kali.org_kali_dists_sana_contrib_binary-armel_Packages 0 :
'http://http.kali.org/kali/dists/sana/contrib/i18n/Translation-en.bz2' http.kali.org_kali_dists_sana_contrib_i18n_Translation-en 0 :
'http://http.kali.org/kali/dists/sana/main/i18n/Translation-en.bz2' http.kali.org_kali_dists_sana_main_i18n_Translation-en 0 :
'http://http.kali.org/kali/dists/sana/non-free/i18n/Translation-en.bz2' http.kali.org_kali_dists_sana_non-free_i18n_Translation-en 0 :
'http://http.kali.org/kali/dists/sana/InRelease' http.kali.org_kali_dists_sana_InRelease 0
我可以看到,它正在尝试加载Sources.bz2
。然而,前往 文件的目录在浏览器中显示只有一个Sources.gz
可用。
我怎样才能知道apt-get
加载 gzipped 版本呢?
答案1
这次问题基本上出在显示器前面,不过我还是找到了一个可以设置的选项:
apt-get -o Acquire::CompressionTypes::Order::=gz update
添加--print-uris
显示apt-get
现在正在尝试获取gz
而不是bz2
.
然而,正如最初所述,这不是主要问题,因为命令仍然失败,无法检索gz
肯定可用的文件。通常apt-get
会搜索多种类型,并且应该能够获取 gzip 压缩版本(如果可用)。
这里的问题是pow
安装在 Mac 上。与 pi 的网络连接使得ping
与外界的连接成为可能,并且任何人都wget
可以下载页面——但不是真正的页面,而是来自 Mac 的 pow 页面。因此没有与更新服务器的连接。