1.查看树莓派的版本:lsb_release -a
一般会有Stretch和Jessie两个不同的版本,我们要根据不同的版本更新对应的源。
以Stretch为例:
我们通常更新的是Raspbian源(raspbian这个源是由独立开发者维护的,与树莓派基金会并无直接联系。)通常位于/etc/apt/sources.list
1.sudo nano /etc/apt/sources.list
2.Stretch版的的源如下,选择一个粘贴即可(注意要把之前的源注释掉)。
中科大
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
清华
deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
大连东软
deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
重庆大学
deb http://mirrors.cqu.edu.cn/Raspbian/raspbian/ stretch main contrib non-free rpi
浙江大学
deb http://mirrors.zju.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
阿里云
deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi
搜狐
deb http://mirrors.sohu.com/raspbian/raspbian/ stretch main contrib non-free rpi
元智大学(中国台湾)
deb http://ftp.cse.yzu.edu.tw/Linux/raspbian/raspbian/ stretch main contrib non-free rpi
北陆先端科学技术大学院大学(日本知名镜像站,日常出口带宽2g)
deb http://ftp.jaist.ac.jp/raspbian/ stretch main contrib non-free rpi
牛津大学
deb http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/ stretch main contrib non-free rpi
美国Berkely大学
deb http://mirrors.ocf.berkeley.edu/raspbian/raspbian/ stretch main contrib non-free rpi
美国俄克拉荷马大学
deb http://reflection.oss.ou.edu/raspbian/raspbian/ stretch main contrib non-free rpi
南非知名软件源
deb http://mirror.liquidtelecom.com/raspbian/raspbian/ stretch main contrib non-free rpi
默认源(带重定向by mirrorbrain)
deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi
官方源
deb https://archive.raspbian.org/raspbian/ stretch main contrib non-free rpi
Jessie的源如下
中科大
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ jessie main contrib non-free rpi
清华
deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main contrib non-free rpi
大连东软
deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ jessie main contrib non-free rpi
重庆大学
deb http://mirrors.cqu.edu.cn/Raspbian/raspbian/ jessie main contrib non-free rpi
浙江大学
deb http://mirrors.zju.edu.cn/raspbian/raspbian/ jessie main contrib non-free rpi
阿里云
deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main contrib non-free rpi
搜狐
deb http://mirrors.sohu.com/raspbian/raspbian/ jessie main contrib non-free rpi
元智大学(中国台湾)
deb http://ftp.cse.yzu.edu.tw/Linux/raspbian/raspbian/ jessie main contrib non-free rpi
北陆先端科学技术大学院大学(日本知名镜像站,日常出口带宽2g)
deb http://ftp.jaist.ac.jp/raspbian/ jessie main contrib non-free rpi
牛津大学
deb http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/ jessie main contrib non-free rpi
美国Berkely大学
deb http://mirrors.ocf.berkeley.edu/raspbian/raspbian/ jessie main contrib non-free rpi
美国俄克拉荷马大学
deb http://reflection.oss.ou.edu/raspbian/raspbian/ jessie main contrib non-free rpi
南非知名软件源
deb http://mirror.liquidtelecom.com/raspbian/raspbian/ jessie main contrib non-free rpi
默认源(带重定向by mirrorbrain)
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
官方源
deb https://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
3.保存退出后更新一下,sudo apt-get update