> 文档中心 > raspberrypi更新加速-修改为国内源

raspberrypi更新加速-修改为国内源

很多人修改树莓派系统软件仓库源时只修改了一处,在做更新是依然很慢,应该修改两处:

  1. sources.list
    我这里用的是阿里云的源
# cat /etc/apt/sources.list#deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi# Uncomment line below then 'apt-get update' to enable 'apt-get source'#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi#阿里云deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main contrib non-free rpi#deb-src http://mirrors.aliyun.com/raspbian/raspbian/ buster main contrib non-free rpi
  1. raspi.list
    我这里用的是科大的源
root@raspberrypi:~# cat /etc/apt/sources.list.d/raspi.list #deb http://archive.raspberrypi.org/debian/ buster main# Uncomment line below then 'apt-get update' to enable 'apt-get source'#deb-src http://archive.raspberrypi.org/debian/ buster main# 科大deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ buster main
  • 注意:国内有很多镜像加速源,自己百度一个靠谱的,很多,上面只是示例,请根据的os版本修改 ‘buster’ 为自己的版本,查看树莓派os版本的方法:
# lsb_release -aNo LSB modules are available.Distributor ID:RaspbianDescription:Raspbian GNU/Linux 10 (buster)Release:10Codename:buster

如上,我的是 buster