Debian 默认apt-get源为从cd介质安装
⒈备份官方默认更新源文件
cp /etc/apt/sources.list /etc/apt/sources.list.bak 备份官方更新源文件
⒉编辑
1.打开
vi /etc/apt/sources.list
2.清空内容
ESC后进入命令模式输入
:.,$d
也可以注释以下内容
# deb cdrom:[Debian GNU/Linux 10.7.0 _Buster_ - Official amd64 DVD Binary-1 20201205-11:17]/ buster contrib main
3.复制以下内容(清华大学镜像站)https://mirrors.tuna.tsinghua.edu.cn/help/debian/
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
4.保存
ESC后进入命令模式输入
:wq
⒊更新源
apt update
作者:奇
出处:https://www.cnblogs.com/fanqisoft/
本文版权归作者和博客园共有,欢迎转载,但必须给出原文链接,并保留此段声明,否则保留追究法律责任的权利。