前言
树莓派目前最新为debian12系统,网上有很多旧的换源方式,随着系统更新不一定有效
流程
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
备份旧的数据
sudo nano /etc/apt/sources.list
编辑sources.list文件
deb http://mirrors.aliyun.com/debian/ bookworm main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bookworm main non-free contribdeb http://mirrors.aliyun.com/debian-security bookworm-security main
deb-src http://mirrors.aliyun.com/debian-security bookworm-security maindeb http://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib
把原有的信息都#号注释,添加如上的信息