型号: 树莓派 3b+
系统:Raspbian系统(Debian)
本质:常见更新教程是更新 :/etc/apt/sources.list 里面源,其实还有一个地方需要更新 :/etc/apt/sources.list.d/raspi.list
备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.bak
修改软件更新源,用中科大站点:
sudo nano /etc/apt/sources.list
修改后如下:
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free$
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ stretch main contrib non-free rpi
ctrl+o 保存 → 回车 确认 → ctrl+x 退出
再修改系统更新源:
sudo nano /etc/apt/sources.list.d/raspi.list
同样修改首行网址,修改后如下:
deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ stretch main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ stretch main ui
ctrl+o 保存 → 回车 确认 → ctrl+x 退出
更新
sudo apt-get update ; sudo apt-get upgrade ; sudo apt-get dist-upgrade ; sudo rpi-update
此处为更新软件源列表、软件版本和内核版本,因为更新内容比较多,所以耗时长些