Pacman 不下载任何内容 - 始终 404

Pacman 不下载任何内容 - 始终 404

我想在运行 Arch Linux 的 Raspberry Pi 上安装一些软件,但我一直收到错误 404。

我做了一些研究,发现我需要pacman -Syypacman -Syu......

当我启用pacman -Syy所有镜像运行时,我得到:

# pacman -Syy
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from mirror.aarnet.edu.au : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from ftp.iinet.net.au : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from mirror.internode.on.net : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from mirror.optus.net : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from mirror.rackcentral.com.au : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from syd.mirror.rackspace.com : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from ftp.swin.edu.au : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from archlinux.mirror.uber.com.au : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from mirror1.htu.tugraz.at : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from mirrors.ispros.com.bd : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from ftp.byfly.by : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from mirror.datacenter.by : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from archlinux.cu.be : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from archlinux.mirror.kangaroot.net : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from archlinux.c3sl.ufpr.br : The requested URL returned error: 404 Not Found
error: failed retrieving file 'core.db' from www.las.ic.unicamp.br : The requested URL returned error: 404 Not Found`

我检查过了,它针对整个core.db文件、所有镜像、以及extra.dbcommunity.db都这么说aur.db

我能 ping 通各种服务器,所以我有互联网。此外,我还在家庭网络上通过 SSH 执行此操作。

编辑:我没有使用代理服务器。

如果有帮助的话,我可以使用rankmirrors下载镜像列表并取消注释其中一些以供使用,我推测这是基于速度的。

答案1

尝试使用curl(它是核心的一部分,因此应该安装)通过以下命令下载 core.db 文件。这将有助于排除您的问题是否与其pacman配置有关,或者您的问题是否与您的 Internet 连接有关。

curl -O http://mirror.aarnet.edu.au/pub/archlinux/core/os/x86_64/core.db

如果 core.db 下载成功,请在文本编辑器(nano core.db或甚至less core.db)中打开它。如果内容看起来类似于下面的 HTML(具体404 Not Found在内容的某处说明),那么可能是您的 pacman 配置。我会下载最新的 Arch 安装 CD 并从中重新安装 pacman。

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /pub/archlinux/core/os/x86_64/core.db was not foun$
<hr>
<address>Apache/2.2.15 (Red Hat) Server at 127.0.0.1 Port 8080</address>
</body></html>

如果 core.db 下载失败,则说明您的 Internet 连接有问题。发布您收到的任何错误消息,我们可以帮助您进一步排除故障。

另外,运行此命令

cat /etc/pacman.d/mirrorlist | grep aarnet.edu.au

并验证输出是否与此匹配

Server = http://mirror.aarnet.edu.au/pub/archlinux/$repo/os/$arch

如果没有,请下载最新的镜像列表并取消注释您的镜像。您可以使用此命令快速完成此操作(您仍然需要在文本编辑器中打开它并取消注释行Server = ...)。

sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist~ && curl -o /etc/pacman.d/mirrorlist https://www.archlinux.org/mirrorlist/?country=AU

如果这样做之后pacman -Syy仍然失败,那么我认为你的 pacman 安装完全损坏了。按照Arch Wiki 上关于重新安装 pacman 的说明

答案2

使用镜面反射器

sudo pacman -S reflector 

安装它并输入:

sudo reflector -l 5 --sort rate --save /etc/pacman.d/mirrorlist

答案3

需要说明的是,如果您不是 ARM 用户,您可能拥有 32 位 Arch Linux,但 i686 支持已结束。

$ pacman -Syu --debug

如果你在 repo URL 中看到 i686,那么你应该切换到Arch Linux 32。基本上你可以使用它的镜像列表,而不用官方的。

答案4

如果你在里面运行 ArchVMWare 或 Virtualbox检查你的防火墙和防病毒软件主系统的设置。

对于具有以下限制的系统,打开 Internet 连接共享可能很有用:http://blog.timmattison.com/archives/2011/07/12/how-to-fix-vmware-connectivity-problems-after-installing-avast-internet-security/

相关内容