- Debian 源使用帮助
- http://mirrors.ustc.edu.cn/debian stable main contrib non-free
">deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free - http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free">deb-src http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
- http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
">deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free - http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free">deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
- »
- Debian 源使用帮助
- 在 GitHub 上修改
Debian 源使用帮助
地址
https://mirrors.ustc.edu.cn/debian/
说明
Debian 软件源
收录架构
Debian 支持的所有架构,如 AMD64 (x86_64), Intel x86, ARM, MIPS, ppc64el, s390x 等
收录版本
Debian Old Stable, Stable, Testing, Unstable(sid)
当前 Stable 为 Debian 11,代号为 Bullseye
使用说明
警告
操作前请做好相应备份
一般情况下,将 /etc/apt/sources.list
文件中 Debian 默认的源地址 http://deb.debian.org/
替换为 http://mirrors.ustc.edu.cn
即可。
可以使用如下命令:
sudo sed -i ‘s/deb.debian.org/mirrors.ustc.edu.cn/g’ /etc/apt/sources.list
当然也可以直接编辑 /etc/apt/sources.list
文件(需要使用 sudo)。以下是 Debian Stable 参考配置内容:
deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
同时你也可能需要更改 Debian Security 源,请参考 Debian Security 源使用帮助
更改完 sources.list
文件后请运行 sudo apt-get update
更新索引以生效。
小技巧
使用 HTTPS 可以有效避免国内运营商的缓存劫持,但需要事先安装 apt-transport-https
(Debian Buster 及以上版本不需要)。
另外,也可以使用 snullp 大叔开发的 配置生成器 。
警告
在 apt 2.1.9 及以后的版本中,apt 的 HTTP Pipelining 特性与 Nginx 服务器疑似存在一定的不兼容问题,可能导致高带宽从镜像站下载大量软件包 (例如系统升级)时出现偶发的 Connection reset by peer 错误 (详见 Debian bug #973581)。
目前,用户可以通过关闭 HTTP Pipelining 特性解决此问题。 如果需要关闭,可以在使用 apt
命令时加上 -o Acquire::http::Pipeline-Depth=0
参数, 或使用以下命令将相关设置加入 apt 系统配置中:
echo “Acquire::http::Pipeline-Depth \”0\”;” > /etc/apt/apt.conf.d/99nopipelining
相关链接
官方主页
邮件列表
https://www.debian.org/MailingLists/
Wiki
文档
镜像列表
https://www.debian.org/mirror/list
© 版权所有 2017 - 2022, LUG@USTC.
利用 Sphinx 构建,使用了 主题 由 Read the Docs开发.
除额外注明的地方外,本文档按 CC BY-NC-SA 4.0 许可协议发布。
https://mirrors.ustc.edu.cn/help/debian.html