Debian 拉伸存储库 404 未找到

问题描述 投票:0回答:7

今天我在运行时开始收到这些错误消息

apt-get update

404  Not Found

E: The repository 'http://security.debian.org stretch/updates Release' does no longer have a Release file.

你知道这可能是什么原因吗?

我更新了来源:

deb http://security.debian.org/ stretch/updates main

deb http://security.debian.org/ stretch/updates main contrib non-free

但我不断收到同样的错误

debian repository debian-stretch
7个回答
41
投票

谢谢路易斯,

我刚刚测试了你的解决方案,它运行良好。

对于 docker 用户,这是你必须做的:

FROM php:5.6-fpm as base

#Update stretch repositories
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

17
投票

ok 经过进一步研究,我发现debian imported stretch suite to

archive.debian.org

https://lists.debian.org/debian-devel-announce/2023/03/msg00006.html

所以我通过替换源来修复它。

deb.debian.org
archive.debian.org

security.debian.org
archive.debian.org/debian-security/

并删除源

stretch-updates
因为它在档案源中不可用:debian stretch archive

命令:

我使用这些 bash 命令进行替换:

用 archive.debian.org 替换 deb.debian.org:

sudo sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list

将 security.debian.org 替换为 archive.debian.org/debian-security/:

sudo sed -i 's|security.debian.org|archive.debian.org/debian-security/|g' /etc/apt/sources.list 

删除包含源拉伸更新的行:

sudo sed -i '/stretch-updates/d' /etc/apt/sources.list 


1
投票

在我的例子中,问题已经通过 docker 文件中较新的 NodeJS 基础映像解决,如下所示。

我们有:

FROM node:14.18.3-slim

在 dockerfile 但我将其更改为:

FROM node:14-slim

我建议将它升级到最新版本,node:18-slim for NodeJs 并为您使用的技术堆栈找到最新版本。


0
投票

您可以添加此更新:

deb http://archive.debian.org/debian stretch-proposed-updates main

0
投票

我遇到了导致 buildx 失败的相同问题,因为在我的情况下它正在尝试构建 docker 镜像。

通过替换我的 Dockerfile 中的以下行解决了这个问题:

RUN add-apt-repository "deb http://http.us.debian.org/debian stretch main contrib non-free"

使用以下行:

RUN add-apt-repository "deb http://archive.debian.org/debian/ stretch main contrib non-free"

0
投票

我必须在我的 docker 文件中替换以下行:

RUN sed -i '/jessie-updates/d' /etc/apt/sources.list

与:

RUN sed -i '/stretch-updates/d' /etc/apt/sources.list

让它再次运行。


0
投票

这对我有用:

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 
© www.soinside.com 2019 - 2024. All rights reserved.