树莓派(raspberrypi)4B/5B更换国内源终极简单教程
·
笔者采用的是最新系统基于Debian12(bookworm)。
打开清华开源镜像,找到Debian源https://mirrors.tuna.tsinghua.edu.cn/help/debian/

默认选传统格式,打开树莓派源配置文件:sudo vi /etc/apt/sources.list,复制清华源进去,并把默认源注释掉。
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
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
如果是Debian12容器镜像就选DEB822 格式,配置文件则是:sudo vi /etc/apt/sources.list.d/debian.sources
更多推荐
所有评论(0)