2

I'm trying to install watchdog on a Pi running Raspbian v 3.12: 2014-09-09, it's currently connected to the internet fine.

However if I try to install it

sudo apt-get install watchdog

I receive 403 errors

Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: watchdog 0 upgraded, 1 newly installed, 0 to remove and 30 not upgraded. Need to get 81.7 kB of archives. After this operation, 209 kB of additional disk space will be used. Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main watchdog armhf 5.12-1 403 Forbidden Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/w/watchdog/watchdog_5.12-1_armhf.deb 403 Forbidden

performing apt-get update doesn't seem to throw any errors, but performing apt-get upgrade or apt-get dist-upgrade throws forbidden messages as well

Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/w/wget/wget_1.13.4-3+deb7u2_armhf.deb 403 Forbidden Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/o/openssl/openssl_1.0.1e-2+rvt+deb7u13_armhf.deb 403 Forbidden Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/c/ca-certificates/ca-certificates_20130119+deb7u1_all.deb 403 Forbidden Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/d/dbus/dbus_1.6.8-1+deb7u4_armhf.deb 403 Forbidden Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/d/dbus/dbus-x11_1.6.8-1+deb7u4_armhf.deb 403 Forbidden etc...

The only similar post I've found regarding this issue tells me it's "A web server glitch I guess". However I've had this problem since Friday and I doubt something this large could be happening for that length of time without more people asking similar questions, so it's more likely something wrong with my setup?

Although I haven't really changed anything since I first bought the Pi ~1 year ago, when updating/intalling/upgrading etc... worked fine, so I'm somewhat unsure where to begin.

1
  • out of SD card space. I had something similar or the FS is read only.
    – Piotr Kula
    Dec 2, 2014 at 17:46

3 Answers 3

2

Looks like a bad repo source, which I had previously thought was unlikely considering it's the default given within that particular distribution of Raspbian, strange.

Changing to the archive source fixed it for me, to do this yourself navigate to your sources list

sudo nano /etc/apt/sources.list

which, if you had the same problem as me, has one source in it:

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi

comment that out and replace it with the archive sources mentioned previously, so your sources.list should now look like

#deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://archive.raspbian.org/raspbian wheezy main contrib non-free
deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free

Add the Raspbian public key to your apt-get keyring

wget http://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -

Then try your apt-get upgrade/install again, mine worked fine after doing this.

1

For some reason the server is refusing your Pi's requests.

I have compiled some basic troubleshooting steps, mostly gathered from http://pcsupport.about.com/od/findbyerrormessage/a/403error.htm

Reboot

Try the age old trick of rebooting your router and your Pi.

Try downloading it from another computer

Go onto any browser and type in the URL of one of the packages apt-get couldn't retrieve. Does the browser give you a 403 forbidden message? If so you might want to contact your ISP because your IP might have been blacklisted from the server (I wouldn't know why).

Check for VPNs and/or proxies

Your router and/or your pi might be using a proxy that the server has blacklisted. Disabling it might help.

Use a different network

Maybe connect to your phone as a hotspot or go to a coffee shop with free WiFi. If it works there, but not at home contact your ISP and/or try and contact the owners of the server (I wouldn't really know how to do this).

1

Unfortunately apt's error reporting sucks. When it gets a redirect that leads to an error it tells you the error code but it doesn't tell you that it followed a redirect first or where that redirect took it to. I brought this up with the developers of apt but apparently it's difficult to fix due to design issues https://lists.debian.org/deity/2014/04/msg00097.html

Attempting to retrieve the url that gave the error manually with wget will often give you more information on what is going wrong. Sometimes it's a redirect to a bad mirror (if so please post details over on the raspberry pi forums). Sometimes it's something on the local network messing with the traffic. In the case of 404 errors it can also be outdated package lists (run apt-get update and check it suceeds) but that shouldn't cause a 403 error.

If the problem is a bad mirror then replacing mirrordirector.raspbian.org with archive.raspbian.org or a manually selected mirror in /etc/apt/sources.list is a usable workaround.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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