# Update stretch repositories
RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \
-e 's|security.debian.org|archive.debian.org/|g' \
-e '/stretch-updates/d' /etc/apt/sources.list
–
OK, after further research, I found that Debian imported the stretch suite to archive.debian.org
, according to https://lists.debian.org/debian-devel-announce/2023/03/msg00006.html
So I fixed it by replacing the sources:
deb.debian.org
to archive.debian.org
security.debian.org
to archive.debian.org/debian-security/
And removing the source stretch-updates
since it's not available in the archive's sources: Debian Stretch archive
Commands:
I used these bash commands to make the replacement:
replace deb.debian.org with archive.debian.org:
sudo sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
replace security.debian.org with archive.debian.org/debian-security/:
sudo sed -i 's|security.debian.org|archive.debian.org/debian-security/|g' /etc/apt/sources.list
remove line that contains source stretch-updates:
sudo sed -i '/stretch-updates/d' /etc/apt/sources.list
–
In my case the problem has been solved with newer NodeJS base image in docker file as follow.
We had:
FROM node:14.18.3-slim
in dockerfile but I changed it to:
FROM node:14-slim
I recommend to bump it to the latest version, node:18-slim for NodeJs and find the latest version for your tech stack you use.
I bumped into the same issue leading to buildx failure, as in my case it was trying to build docker image.
Solved it by replacing the below line in my Dockerfile:
RUN add-apt-repository "deb http://http.us.debian.org/debian stretch main contrib non-free"
with the following line:
RUN add-apt-repository "deb http://archive.debian.org/debian/ stretch main contrib non-free"
I have to replace below line in my docker file:
RUN sed -i '/jessie-updates/d' /etc/apt/sources.list
with :
RUN sed -i '/stretch-updates/d' /etc/apt/sources.list
to get it running again.
This works for me:
RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
RUN sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list
RUN sed -i '/stretch-updates/d' /etc/apt/sources.list
Agree with Alain Hernadez's answer. Just watch out for the security source. Not archive.debian.org but archive.debian.org/debian-security instead.
RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \
-e 's|security.debian.org|archive.debian.org/debian-security/|g' \
-e '/stretch-updates/d' /etc/apt/sources.list
Did you made any changes to your network? Maybe something with firewall is going wrong.
I have an proxmox VM server with LAMP on it. I redirected incoming traffic from port 80 to this LAMP instance and then i cannot no more get apt-update. I was reading 5 of the google pages, trying to find some help but after typing in my shell apt-get update
and watching the log on the router - i saw that there is problem with routing - packets will go to the LAMP server, not the proxmox VM
Solution to this was to disable the dst-nat port redirecting.
I think this may be confusing to a lot of people, because you can ping the server, everything responds okay, there is no issue with DNS lookup or something like this - its just packets that are going to nowhere :)
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.