I am running a Travis build and it fails when building the mysql:5.7.27 docker image. The Dockerfile runs apt-get update
and then I get an error W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found
.
Using curl I can see it is redirecting, but the redirect-to URL results in a 404. Has anyone seen this sort of behaviour and have a remedy? Is it basically unfixable until debian makes changes?
➜ ms git:(develop) curl --head http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages
HTTP/1.1 302 Found
Date: Tue, 26 Mar 2019 16:03:04 GMT
Server: Apache
X-Content-Type-Options: nosniff
X-Frame-Options: sameorigin
Referrer-Policy: no-referrer
X-Xss-Protection: 1
Location: http://cdn-fastly.deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages
Content-Type: text/html; charset=iso-8859-1
➜ ms git:(develop) curl --head http://cdn-fastly.deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages
HTTP/1.1 404 Not Found
Server: Apache
X-Content-Type-Options: nosniff
X-Frame-Options: sameorigin
Referrer-Policy: no-referrer
X-Xss-Protection: 1
Content-Type: text/html; charset=iso-8859-1
Via: 1.1 varnish
Content-Length: 316
Accept-Ranges: bytes
Date: Tue, 26 Mar 2019 16:03:17 GMT
Via: 1.1 varnish
Age: 45
Connection: keep-alive
X-Served-By: cache-ams21028-AMS, cache-cdg20741-CDG
X-Cache: HIT, HIT
X-Cache-Hits: 6, 2
X-Timer: S1553616198.734091,VS0,VE0
After installing the APT package, check the /usr/bin/ directory to ensure if it had properly installed. If the file is empty, then run the locate apt-get command again. If no result is shown, there is no alternative but to reinstall the operating system. This might fix the problem.
Here is a quick way to fix " 404 Not Found " errors on old Ubuntu by switching to old-releases repositories. First, replace main / security repositories with old-releases versions as follows. Then open /etc/apt/sources. list with a text editor, and look for extras.ubuntu.com .
1) In the first step open the Terminal & type, apt-get update and then press the enter button. Now make sure you got a similar error as shown in the picture below. 2) Now open the app drawer & search “Software & Update”, now open the app from the search result. 3) Now go to the Ubuntu Software section.
How to Use the sudo apt-get upgrade Command. After running the sudo apt-get update command, in the same terminal window, type in sudo apt-get upgrade , enter your password if necessary, and hit enter.
This is due to the fact that
as Wheezy and Jessie have been integrated into the archive.debian.org structure recently, we are now removing all of Wheezy and all non-LTS architectures of Jessie from the mirror network starting today.
(As you can read here)
A solution (according to https://github.com/debuerreotype/docker-debian-artifacts/issues/66#issuecomment-476616579) is to add this line:
RUN sed -i '/jessie-updates/d' /etc/apt/sources.list # Now archived
into your Dockerfile before calling any apt-get update
when using debian:jessie. This will remove the jessie-updates
repository (which now causes the 404) from sources.list.
So while the following doesn't work:
FROM debian:jessie
RUN apt-get update
CMD /bin/sh
It works like:
FROM debian:jessie
RUN sed -i '/jessie-updates/d' /etc/apt/sources.list # Now archived
RUN apt-get update
CMD /bin/sh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With