阅读量:2
以下是Debian软件源配置指南:
备份原始文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
配置国内源(以清华源为例)
- 方法一:直接编辑
/etc/apt/sources.list
将内容替换为(根据系统版本替换sudo nano /etc/apt/sources.listbookworm等代号):deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware - 方法二:使用DEB822格式(推荐)
在
/etc/apt/sources.list.d/目录下创建.sources文件,如debian.sources:
添加内容:sudo nano /etc/apt/sources.list.d/debian.sourcesTypes: deb deb-src URIs: https://mirrors.tuna.tsinghua.edu.cn/debian Suites: bookworm bookworm-updates bookworm-security Components: main contrib non-free non-free-firmware Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
更新软件包列表
sudo apt update
以上就是关于“Debian软件源配置指南”的相关介绍,筋斗云是国内较早的云主机应用的服务商,拥有10余年行业经验,提供丰富的云服务器、租用服务器等相关产品服务。云服务器资源弹性伸缩,主机vCPU、内存性能强悍、超高I/O速度、故障秒级恢复;电子化备案,提交快速,专业团队7×24小时服务支持!
简单好用、高性价比云服务器租用链接:https://www.jindouyun.cn/product/cvm