树莓派清华源的设置
当前系统版本为bullseye
树莓派如何查看系统版本信息
sudo lsb_release -a
红框中部分即为当前系统版本代号
系统版本不一样按照下面提示修改
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
注意 链接后面紧跟 系统版本 和 其他信息,如果系统不一样,把bullseye改为你的系统版本,可以根据链接仿照文件中自带的链接配置写
control s保存
control x退出
sudo nano /etc/apt/sources.list.d/raspi.list
将内容注释,添加
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main
这里的系统版本信息的更改方式和上面一样
换完源更新一下
sudo apt-get update
sudo apt-get upgrade