10

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.

  • Are you using any proxy? – Daniel B Aug 11 '14 at 16:16
  • No, just a router, no proxy, unless my ISP is using one, but I personally, am not. – James Talbert Aug 11 '14 at 16:24
  • Can you open webpages in lynx or links? (I ask because pacman and links/lynx use HTTP, whereas SSH and ping do not.) – Trav Aug 11 '14 at 19:11
  • I don't have those. If I type either lynx or links into bash, I get command not found. I imagine that I would use pacman -S lynx to get it, but pacman's not working. – James Talbert Aug 11 '14 at 22:27
5

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.

  • It looks like this:^B▒^▒/^^G▒▒gp^▒;▒Wi?^▒▒*c^?▒?^▒▒▒>^?/^R▒=▒^▒▒Oj^A▒c▒^_▒▒^▒▒▒▒b▒^G▒^▒▒^_b▒▒▒3N – James Talbert Aug 12 '14 at 21:11
  • Actually, it's a long file, but there's a char limit. It all looks like the above though. – James Talbert Aug 12 '14 at 22:25
  • Then it successfully downloaded the core.db file, and you've verified it's not your Internet connection. I've updated my answer to include some more steps. – Drew Chapin Aug 13 '14 at 0:56
3

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.

  • The question States this is on a Raspberry Pi, they run on ARM. – James Talbert Apr 15 '18 at 1:56
  • Thanks, I missed that. However, Google links to this question by a native search for pacman and 404 so I think it still worth to keep it here. I edit the answer for more clarification. – SzieberthAdam Apr 16 '18 at 7:37
2

Use mirror reflector

sudo pacman -S reflector 

Install it and type:

sudo reflector -l 5 --sort rate --save /etc/pacman.d/mirrorlist
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/

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.