根据此处的答案,Debian Stretch 存储库已更改为存档。
从 maven:3.5.2-jdk-8 构建 dockerfile 时,apt-get update 无法获取 debian amd64 软件包
我之前的做法/etc/apt/sources.list
是这样的:
deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main
deb http://deb.debian.org/debian stretch main
deb-src http://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian stretch-updates main
deb-src http://deb.debian.org/debian stretch-updates main"
我在文件中更改deb.debian.org
为,但当我执行 apt update 时出现以下错误:archive.debian.org
sources.list
Ign:1 http://security.debian.org/debian-security stretch/updates InRelease
Err:2 http://security.debian.org/debian-security stretch/updates Release
404 Not Found [IP: 146.75.106.132 80]
Ign:3 http://archive.debian.org/debian stretch InRelease
Ign:4 http://archive.debian.org/debian stretch-updates InRelease
Hit:5 http://archive.debian.org/debian stretch Release
Err:6 http://archive.debian.org/debian stretch-updates Release
404 Not Found [IP: 209.87.16.41 80]
Reading package lists...Done
E: The repository 'http://security.debian.org/debian-security 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.
E: The repository 'http://archive.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.
答案1
安全存储库也被移动了;使用
deb http://archive.debian.org/debian-security stretch/updates main
stretch-updates
消失了,你应该删除该行;它是用于更新在点发布之间,并且对于存档版本没有用处(因此本身不存档)。
请注意,Stretch 被移至存档存储库的原因是自 2022 年 6 月底以来它已不再支持(仅通过 Debian);虽然安全存储库仍然存在,但它不会收到进一步的更新。如果您想要 2022 年 6 月之后的安全更新,您应该考虑迁移到较新的版本,或者启用扩展 LTS 存储库,这将为 Debian 9 软件包的子集提供更新直到2027年6月结束(您可以影响通过订阅更新的软件包子集)。