如果你不是企业订阅用户务必删除企业订阅源,否则会造成依赖库无法正常安装等情况
以下命令适合新手不知道哪个源的情况下使用,直接删除其他的源:
rm -rf /etc/apt/sources.list.d/*
下一步就是要更换你需要的第三方源,可以使用自带的vi编辑器或者nano编辑/etc/apt/sources.list,这里推荐使用nano,相对于该系统中的vi更好用:
nano /etc/apt/sources.list
可以直接使用Back键删除,清空内容后复制下方的国内源直接覆盖即可
新手如何保存?
使用 CTRL+X组合键 ,根据提示是否保存发送 yes 接下来会提示是否覆盖,直接按enter回车默认即可
最后可以通过 cat /etc/apt/sources.list 验证是否更改成功
7.x版本中科大源
deb https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security bullseye-security main contrib
deb https://mirrors.ustc.edu.cn/proxmox/debian bullseye pve-no-subscription