Debian:存储库没有发布文件

50 debian apt package-management

每当尝试从源代码安装某些程序或专门运行 apt update 时,我都会收到以下消息:

E: The repository 'http://ftp.ca.debian.org/debian stretch/updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Run Code Online (Sandbox Code Playgroud)

我在添加架构 i386 后开始得到这个。没有它,我将无法安装专有的 Nvidia 驱动程序,并且 Steam 客户端根本无法启动。这是我的/etc/apt/sources.list阅读内容:

deb http://ftp.ca.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.ca.debian.org/debian/ stretch main contrib non-free

deb http://ftp.ca.debian.org/debian/ stretch/updates main contrib non-free
deb-src http://ftp.ca.debian.org/debian/ stretch/updates main contrib non-free

####stretch-updates, previously known as 'volatile'

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

deb-src http://ftp.ca.debian.org/debian/ stretch-updates main contrib non-free
Run Code Online (Sandbox Code Playgroud)

Ste*_*itt 32

你有stretch-updatesstretch/updates,但后者不再存在(至少在你使用的镜子上)。您应该删除对 的引用stretch/updates,或者 - 如果您希望这些stretch/updates行提供安全更新 -将它们替换为

deb http://security.debian.org/ stretch/updates main contrib non-free
Run Code Online (Sandbox Code Playgroud)

  • 是的,但那是来自`https://security.debian.org`,而不是你的本地镜像。(它是`stretch/updates`,而不是`stretch/release`;有关`Release` 文件和[相应说明],请参见[此处](http://security.debian.org/dists/stretch/updates/) (https://www.debian.org/security/)。) (2认同)
  • `http://archive.debian.org/debian-security` 是新的安全 URL (2认同)

Ali*_*ari 29

运行以下命令,它应该被修复

echo "deb http://archive.debian.org/debian stretch main contrib non-free" > /etc/apt/sources.list
Run Code Online (Sandbox Code Playgroud)

或者通过运行以下命令将存储库网站更改deb.debian.orgarchive.debian.org

sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
Run Code Online (Sandbox Code Playgroud)

如果也有安全性(security.debian.org),那么:

sed -i s/security.debian.org/archive.debian.org/g /etc/apt/sources.list
Run Code Online (Sandbox Code Playgroud)

原因

  • @NotX 2023 年 3 月,Debian 9“stretch”被复制到存档站点,大约一个月后(四月),它从主 Debian 存储库站点中删除。[关于 Debian-devel-announce 邮件列表的公告。](https://lists.debian.org/debian-devel-announce/2023/03/msg00006.html) 这导致 `sources.list` 中的原始存储库条目停止工作。如果您仍然想下载 Debian 9 的软件包,则必须改用存档站点。 (4认同)
  • 感谢这个解决方案!您介意解释一下您在这里实际做什么吗?为什么现在 `/etc/apt/sources.list` 中需要此条目? (2认同)