I am working with a Pi 2, Model B, with wheezy installed. It is connected to the Internet with an Ethernet cord and has a keyboard and Bluetooth dongle plugged into its USB ports, as well as a monitor connected to it through HDMI. That's the setup. I'm pretty new to working with a Pi, but I'm familiar with Linux.
I can ping Google.com with no problem, so I think the Internet is working on the pi. I don't think I'm on a proxy, either, because I checked my desktop, which uses the same Ethernet, on whatismyproxy.com and it didn't find one (not sure how reliable that is).
Every time I try to use apt-get (including apt-get update, install, upgrade, whatever), I get a bunch of 404 not found errors like this:
: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/wheezy/main/binary-armhf/Packages 404 Not Found
: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/main/source/Sources 404 Not Found
: Failed to fetch http://raspberrypi.collabora.com/dists/wheezy/rpi/binary-armhf/Packages 404 Not Found
Plus other 404 not found messages from the same domains (I don't list them all here because I'm typing this by hand). I have tried switching from the mirrordirector mirror to another one in my source.list file, as has been suggested in other posts in this forum (the http://lug.mtu.edu/raspbian one, as I'm in the US, in the mirror list), and I still got 404 messages. I also tried
wget http://mirrordirector.raspbian.org/raspbian/pool/main/e/expat/libexpat1-dev_2.1.0-1+deb7u1_armhf.deb
and that also returned a 404 Not Found, after it said it had connected. I can browse to this library on a web browser just fine, on the Desktop computer that is on the same ethernet. Same with the lug.mtu.edu address, although it looks like that one has an extra 'raspbian' in the address, I tried it both with and without it.
I've been working on it for hours and still can't figure out what's wrong. Any suggestions? I want to be able to install packages on it.
UPDATE
To answer the comments, ping mirrordirector.raspbian.org
does work. I've figured out what's wrong, and I feel a bit dumb. Answer below.
1 Answer 1
I spoke to some co-workers and realized that MAC addresses to new devices on the network here have to be registered to work fully, and apparently ping
is an exception to that. The best way to register the MAC, as was suggested in the comments, was to run the web browser and register on the site that blocked me from browsing the web. I didn't realize this because I only boot the Pi in console mode.
So for those who may look at this question later - if you're having trouble with 404 http errors, you may want to check if your work/university (my case) has some sort of registration process for new devices on the network. And if you're really new to Pi, like me, Pi 2B and later models (not sure about earlier models) can be booted into a desktop mode, where you can run a web browser to check. I used raspi-config
to switch this mode. Then I rebooted the Pi and it started up in desktop mode.
ping mirrordirector.raspbian.org
?startx
). Step 2. Runsudo apt-get update
again and copy paste the results here. If all the repos are giving you a 404 is one thing, if only a few of them are, that's another thing.