【树莓派】树莓派换源
换源
(1)查看系统版本cat /etc/os-release
此为64位操作系统,对应的是Deebin11,bullseye版本
(2)命令sudo nano /etc/apt/sources.list
清除原有内容,写入以下代码:
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
(3)Ctrl+O保存,Enter回车,Ctrl+X退出
(4)命令sudo nano /etc/apt/sources.list.d/raspi.list
清除原有内容,写入以下代码:
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ bullseye main
(5)Ctrl+O保存,Enter回车,Ctrl+X退出
更新源
(1)命令sudo apt update
(2)命令sudo apt upgrade
参考
https://blog.csdn.net/m0_66648798/article/details/126567478(其中包含了不同版本树莓派的换源方法)