为什么我把 debian12 的 apt 源替换为上海交大之后,还会连接 debian 官方源?-灵析社区

笑面猫

debian 12改了,默认不使用`/etc/apt/sources.list`文件,这个文件初始是空的,真正的仓库配置在 `/etc/apt/sources.list.d/` 目录下,并且格式不是以前常见的简化格式( ONE-LINE-STYLE FORMAT ),而是被称为 `deb822`的新格式,新格式参考: [https://www.debian.org/doc/manuals/debian-reference/ch02#_deb...](https://link.segmentfault.com/?enc=yCBBCelq9n0dk0TCJTHb%2Fw%3D%3D.tl1sKnAE9d1gFwbaCJFnlpaCYDFT0F2dvvp0ABBOLPHkCp%2BYCQ2bCF%2BmwMpPCh0qU9aJj1tXu9bndbjqSiF7rabJyVZqrTN%2BC3YYDiiANzA%3D) 并且在debian的man手册中提到,deb822的引入会逐步废弃掉老的one-line format: [https://manpages.debian.org/bookworm/apt/sources.list.5.en.html](https://link.segmentfault.com/?enc=2fi%2BRTNszASxWeAtFUfxBw%3D%3D.bPFmAQfGsR3bA%2Fl1Pby1fwBxCnKpeYhtLc5RTdLhcCjTnctsjeoDVQx%2ByL0y7ymt79092kjtyEF0zvd4jliKDw%3D%3D) 在 **DEB822-STYLE FORMAT** 章节下有这样的说明 > This is a new format supported by apt itself since version 1.1. Previous > versions ignore such files with a notice message as described earlier. It is > intended to make this format gradually the default format, deprecating the > previously described one-line-style format, as it is easier to create, > extend and modify for humans and machines alike especially if a lot of > sources and/or options are involved. Developers who are working with and/or > parsing apt sources are highly encouraged to add support for this format and > to contact the APT team to coordinate and share this work. Users can freely > adopt this format already, but may encounter problems with software not > supporting the format yet. 你需要一并删除`/etc/apt/sources.list.d/`目录下的文件才行

阅读量:1

点赞量:0

问AI