欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Debian10 更换apt源

程序员文章站 2022-07-03 23:21:08
...

http://mirrors.163.com/.help/debian.html 163 官方源地址,每4小时更新一次

如果是 Debian10 更换apt源,查看debian10具体代号,是buster,如下所示:

[email protected]:/etc/apt# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

所以需要将163 官方源地址的代号统一改为buster即可,如下所示(以下只是2020/6/16的示例,具体需要根据163 官方源地址最新发布内容进行更改)

deb http://mirrors.163.com/debian/ buster main non-free contrib
deb http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ buster main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib

将内容覆盖到 /etc/apt/sources.list,最后通过 apt-get update 进行更新