Unable to fetch some archives using apt-get on Raspbian

Are you receiving a “404 Not Found” error when trying to download some packages using apt-get?

While trying to install Hyperion on a Raspberry Pi 2 using the Jessie Lite image I struggled quite a bit to install the required dependencies. While apt-get normally works pretty well, some packages such as git and libqtgui4 returned a “404 Not Found”. Running apt-get update worked, but didn’t seem to solve the issue.

Fortunately I found a fix for this thanks to the #raspbian IRC channel. First of all make sure that you have a working network connection using ping google.com. If that doesn’t help use google to search for the package you want to install and add it to /var/cache/apt/archives/ so apt-get can find it.

In my case I googled for libcups2_1.7.5-11+deb8u1_armhf.deb and found another mirror for the .deb package. Then navigate to /var/cache/apt/archives/ and use wget to download the package such as wget http://.../libcups2_1.7.5-11+deb8u1_armhf.deb. Running apt-get install libqtgui4 again should now install the package.

This is of cause not a perfect solution, but if the repository is down it’s nice to know that you can add packages to the apt-get cache manually.


Share this:

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.