22

I want to install some software on my Raspberry Pi running Arch Linux, but I keep getting error 404.

I did some research and found that I needed to do pacman -Syy and pacman -Syu...

When I run pacman -Syy with all mirrors enabled, I get:

# 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`

I have checked, it says this for the entire core.db file, on all mirrors, and for extra.db, community.db and aur.db.

I am able to ping various servers, so I have internet. Also, I am doing this over SSH on a home network.

EDIT: I am not using a proxy server.

If it helps, I am able to use rankmirrors which downloads a list of mirrors and uncomments some of them for use, I presume that this is based upon speed.

6 Answers6

10

Use mirror reflector

sudo pacman -S reflector 

Install it and type:

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

Try using curl (it's part of the core, so should be installed) to download the core.db file using the command below. This will help rule out whether your problem is related to pacman and/or its configuration, or whether your problem is related to your Internet connection.

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

If core.db successfully downloads, open it in a text editor (nano core.db or even less core.db). If the contents look similar to this HTML below (specifically saying 404 Not Found somewhere in the contents), then it's probably your pacman configuration. I would download the latest Arch Installation CD and re-install pacman from that.

<!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>

If core.db fails to download, then it's your Internet connection. Post any error messages you receive and we can help you further troubleshoot.

Also, run this command command

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

and verify the output matches this

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

If it does not, download the latest mirror list and uncomment your mirrors. You can do this quickly using this command (you'll still need to open it in a text editor and uncomment the lines Server = ... lines).

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

If after doing this, pacman -Syy still fails, then it's my opinion your installation of pacman is completely broken. Follow the instructions on the Arch Wiki to re-install pacman.

Drew Chapin
  • 6,270
5

For the record, if you are not an ARM user, you may have a 32 bit Arch Linux, but the i686 support ended.

$ pacman -Syu --debug

If you see i686 in the repo URLs, then you should switch to Arch Linux 32. Basically you can use its mirrorlist instead of the official one.

2

I ran into this issue today with my new Raspberry Pi 4.
In my case, pacman-mirrors generated URLs ending with

.../$arch/$repo

but it should, in fact, be

.../$repo/$arch

hence the 404 error during the download.

zx485
  • 2,337
0

I ran into this very issue; what I found was that the nameserver (OpenNIC) I was using wasn't resolving the URLs on the mirrorlist.

I edited /etc/resolv.conf, added another DNS server that properly resolved URLs and pacman successfully updated:

GNU nano 2.5.3                          File: /etc/resolv.conf

nameserver 127.0.0.1
nameserver 104.238.153.178
nameserver //add new DNS server here//

If your resolv.conf says:

# Generated by resolvconf

You'll need to modify /etc/resolvconf.conf to make these changes permanent:

GNU nano 2.5.3                         File: /etc/resolvconf.conf

name_servers=//add new DNS server here//

I have yet to find a /etc/resolvconfconf.conf or /etc/resolvconfconfconf.conf, so if resolving URLs is the issue, the above steps should take care of it. Good luck! :-)

0

If you run Arch inside VMWare or Virtualbox check your firewall and antivirus settings of main system.

Maybe useful to turn on Internet Connection Sharing for systems which has that restrictions: http://blog.timmattison.com/archives/2011/07/12/how-to-fix-vmware-connectivity-problems-after-installing-avast-internet-security/