树莓派更换源

保存原有配置
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

vim /etc/apt/sources.list

image.png

查看属于哪个版本,然后替换源(这个是阿里的源)

deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi

删除从新构建
sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.bak
sudo rm /etc/apt/sources.list.d/raspi.list

sudo apt-get update
sudo apt-get update && apt-get upgrade -y

你可能感兴趣的:(树莓派更换源)