2024-04-10 Raspbian OS 上设置 tuna 源

本来是一件很自然的事情,但是最近出现一点意外。猜测是因为 debian 的系统做了升级。

先说 tuna。tuna 是清华的一个软件镜像站,很多国外的开源应用都在这里有镜像。国内无论什么网络,访问起来都非常快。

燃鹅,最新的 Raspbian OS(现在叫 Raspberrypi OS。先不纠结这些细节)在设置 tuna 源之后,总是会报下面的错误。

E: Malformed stanza 1 in source list /etc/apt/sources.list.d/debian.sources (type)
E: The list of sources could not be read.

因为是直接从 tuna 复制过去的内容,以往都是这么干就没事,茫然不知所措。

仔细阅读原来的 sources.list 文件以后,才发现原来是格式发生了变化。现在不接受短格式,只接受完整格式。

于是改成下面的内容填充进去,OK 了。

Types: deb
URIs: http://mirrors.tuna.tsinghua.edu.cn/debian/
Suites: bookworm bookworm-updates bookworm-backports
Components: main

Types: deb
URIs: http://mirrors.tuna.tsinghua.edu.cn/debian-security
Suites: bookworm-security
Components: main

#deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
## deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

#deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
## deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

#deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
## deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

#deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
## deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

特别注意,用 http 协议,而不是 https。因为 tuna 的某个服务器 http ssl 证书有问题。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容