Debian 8 jessie repo error
On a Debian 8 server, when running apt update, got following error
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
W: Failed to fetch http://mirror.com/debian/dists/jessie/main/source/Sources 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie/non-free/source/Sources 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie/contrib/source/Sources 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie/main/binary-amd64/Packages 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie/non-free/binary-amd64/Packages 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie/contrib/binary-amd64/Packages 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie/main/binary-i386/Packages 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie/non-free/binary-i386/Packages 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie/contrib/binary-i386/Packages 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie-updates/main/source/Sources 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie-updates/contrib/source/Sources 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie-updates/non-free/source/Sources 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie-updates/contrib/binary-amd64/Packages 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie-updates/non-free/binary-amd64/Packages 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie-updates/main/binary-i386/Packages 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie-updates/contrib/binary-i386/Packages 404 Not Found [IP: 185.194.238.133 80] W: Failed to fetch http://mirror.com/debian/dists/jessie-updates/non-free/binary-i386/Packages 404 Not Found [IP: 185.194.238.133 80] E: Some index files failed to download. They have been ignored, or old ones used instead. |
To fix it, run
1 2 |
cp /etc/apt/sources.list /etc/apt/sources.list.backup vi /etc/apt/sources.list |
Add following content to the file
1 2 3 4 5 6 |
deb http://cdn-fastly.deb.debian.org/debian/ jessie main deb-src http://cdn-fastly.deb.debian.org/debian/ jessie main deb http://security.debian.org/ jessie/updates main deb-src http://security.debian.org/ jessie/updates main deb http://archive.debian.org/debian jessie-backports main deb-src http://archive.debian.org/debian jessie-backports main |
Create
1 |
vi /etc/apt/apt.conf |
Add
1 |
Acquire::Check-Valid-Until "false"; |