Debian Security 软件仓库镜像使用帮助

选择镜像

大部分 Debian 的软件源配置文件使用传统的 One-Line-Style,路径为 /etc/apt/sources.list;但是对于容器镜像,从 Debian 12 开始,其软件源配置文件变更为 DEB822 格式,路径为 /etc/apt/sources.list.d/debian.sources。一般情况下,将对应文件中 Debian 默认的源地址 http://security.debian.org/ 替换为镜像地址即可。

不过,一般来说,为了更及时地获得安全更新,不推荐使用镜像站安全更新软件源,因为镜像站往往有同步延迟。参考 https://www.debian.org/security/faq.en.html#mirror

The purpose of security.debian.org is to make security updates available as quickly and easily as possible.

Encouraging the use of unofficial mirrors would add extra complexity that is usually not needed and that can cause frustration if these mirrors are not kept up to date.

传统格式(/etc/apt/sources.list):

Debian 版本
启用源码镜像
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://(Loading...) bookworm-security main contrib non-free non-free-firmware
# deb-src https://(Loading...) bookworm-security main contrib non-free non-free-firmware

DEB822 格式(/etc/apt/sources.list.d/debian.sources):

Debian 版本
启用源码镜像
Types: deb
URIs: https://(Loading...)
Suites: bookworm-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

# Types: deb-src
# URIs: https://(Loading...)
# Suites: bookworm-security
# Components: main contrib non-free non-free-firmware
# Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

这个页面的内容有问题?在 GitHub Issue 反馈

想完善这个页面?查看我们的贡献指南在 GitHub 上查看此页的源代码

本页面的全部内容在 CC BY-NC-SA 4.0 协议之条款下提供,附加条款亦可能应用。