Debian更换仓库源

更换仓库源步骤

备份原有源文件

sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup

编辑新的源文件

sudo vi /etc/apt/sources.list

输入仓库地址,例如

deb http://deb.debian.org/debian unstable main
deb http://deb.debian.org/debian-debug unstable-debug main
deb http://deb.debian.org/debian-ports unstable main

更新软件包

sudo apt-get update

其他说明

全球Debian仓库镜像站地址:https://www.debian.org/mirror/list.zh-cn.html

由于debian9(代号Stretch)已于2022年6月停止支持,官方镜像站点可能已删除相关的存储库。
可以使用Debian的存档镜像作为仓库源

deb http://archive.debian.org/debian/ stretch main
deb-src http://archive.debian.org/debian/ stretch main

deb http://archive.debian.org/debian-security stretch/updates main
deb-src http://archive.debian.org/debian-security stretch/updates main

如果不知道目前版本的debian代号,可以查看备份的仓库源

33506-0474uaanc44b.png

如图所示,main之前是buster,这个就是版本代号

Sitemap · Rss

津ICP备2021004480号-3