Debian Lenny, /etc/apt/sources.list and error 404

From lxadm | Linux administration tips, tutorials, HOWTOs and articles
Jump to: navigation, search

Since Debian Lenny is now deprecated and no longer supported, its packages are now removed from the mirrors. Because of this, you may experience 404 when trying to install the packages with apt-get, or update sources lists.

If you’re not going to upgrade to Debian Squeeze, here are /etc/apt/sources.list lines giving you access to Lenny packages (stored on archive.debian.org servers):

# packages
deb http://archive.debian.org/debian lenny main contrib

# security updates
deb http://archive.debian.org/debian-security/ lenny/updates main contrib

If you’re getting the following error:

root@server:~# apt-get update
Hit http://archive.debian.org lenny Release.gpg
Ign http://archive.debian.org/debian/ lenny/contrib Translation-en
Ign http://archive.debian.org/debian/ lenny/contrib Translation-en_GB
Ign http://archive.debian.org/debian/ lenny/main Translation-en
Ign http://archive.debian.org/debian/ lenny/main Translation-en_GB
Hit http://archive.debian.org lenny/updates Release.gpg
Ign http://archive.debian.org/debian-security/ lenny/updates/contrib Translation-en
Ign http://archive.debian.org/debian-security/ lenny/updates/contrib Translation-en_GB
Ign http://archive.debian.org/debian-security/ lenny/updates/main Translation-en
Ign http://archive.debian.org/debian-security/ lenny/updates/main Translation-en_GB
Hit http://archive.debian.org lenny Release
Hit http://archive.debian.org lenny/updates Release
E: Release file expired, ignoring http://archive.debian.org/debian-security/dists/lenny/updates/Release (invalid since 224d 17h 7min 51s)

you have to use the “-o Acquire::Check-Valid-Until=false” option:

# apt-get -o Acquire::Check-Valid-Until=false update
Hit http://archive.debian.org lenny Release.gpg
Ign http://archive.debian.org/debian/ lenny/contrib Translation-en
Ign http://archive.debian.org/debian/ lenny/contrib Translation-en_GB
Ign http://archive.debian.org/debian/ lenny/main Translation-en
Ign http://archive.debian.org/debian/ lenny/main Translation-en_GB
Get:1 http://archive.debian.org lenny/updates Release.gpg [836 B]
Ign http://archive.debian.org/debian-security/ lenny/updates/contrib Translation-en
Ign http://archive.debian.org/debian-security/ lenny/updates/contrib Translation-en_GB
Ign http://archive.debian.org/debian-security/ lenny/updates/main Translation-en
Ign http://archive.debian.org/debian-security/ lenny/updates/main Translation-en_GB
Hit http://archive.debian.org lenny Release
Hit http://archive.debian.org lenny/updates Release
Hit http://archive.debian.org lenny/main amd64 Packages
Hit http://archive.debian.org lenny/contrib amd64 Packages
Hit http://archive.debian.org lenny/updates/main amd64 Packages
Hit http://archive.debian.org lenny/updates/contrib amd64 Packages
Fetched 836 B in 0s (9,565 B/s)
Reading package lists... Done