Debian Buster 以上版本默认支持 HTTPS 源。如果遇到无法拉取 HTTPS 源的情况,请先使用 HTTP 源并安装:
sudo apt install apt-transport-https ca-certificates
编辑文件,在/etc/apt/sources.list.d/编辑sources.list文件,nano命令:ctrl+o保存,enter回车确认,ctrl+X退出,ctrl+k删除行/剪切
sudo nano /etc/apt/sources.list
写入内容,Debian版本【Debian 13(trixie)】,启用源码镜像【否】,使用官方安全更新软件源选择【否】,sources.list文件写入:
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.ustc.edu.cn/debian/ trixie main contrib non-free non-free-firmware
# deb-src https://mirrors.ustc.edu.cn/debian/ trixie main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ trixie-updates main contrib non-free non-free-firmware
# deb-src https://mirrors.ustc.edu.cn/debian/ trixie-updates main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ trixie-backports main contrib non-free non-free-firmware
# deb-src https://mirrors.ustc.edu.cn/debian/ trixie-backports main contrib non-free non-free-firmware
# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb https://mirrors.ustc.edu.cn/debian-security trixie-security main contrib non-free non-free-firmware
# deb-src https://mirrors.ustc.edu.cn/debian-security trixie-security main contrib non-free non-free-firmware
# deb https://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
# # deb-src https://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
本文由 谭文龙 创作,采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
最后编辑时间为: Sep 4, 2025 at 03:47 pm