树莓派—raspbian软件源

零.一键换源

2018.05.18更新:新的默认源为raspbian.raspberrypi.org
因此一键换源相应改为

sudo sed -i 's#://raspbian.raspberrypi.org#s://mirrors.ustc.edu.cn/raspbian#g' /etc/apt/sources.list 
sudo sed -i 's#://archive.raspberrypi.org/debian#s://mirrors.ustc.edu.cn/archive.raspberrypi.org#g' /etc/apt/sources.list.d/raspi.list
或
sudo sed -i 's#://raspbian.raspberrypi.org#s://mirrors.tuna.tsinghua.edu.cn/raspbian#g' /etc/apt/sources.list
sudo sed -i 's#://archive.raspberrypi.org/debian#s://mirrors.tuna.tsinghua.edu.cn/raspberrypi#g' /etc/apt/sources.list.d/raspi.list

一.树莓派基金会提供的源

/etc/apt/sources.list.d/raspi.list里的软件源是树莓派基金会单独(非Raspbian开发者)提供/维护的软件源,主要包括raspi-config、minecraftpi、树莓派桌面环境、内核固件驱动等少量软件。
这个软件源相关资料比较少,国内目前只有清华(201709开始提供)和中科大有提供
Stretch(三选其一即可)

中科大
deb https://mirrors.ustc.edu.cn/archive.raspberrypi.org/ stretch main ui
清华
deb https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui
默认官方源
deb http://archive.raspberrypi.org/debian/ stretch main ui

二.Raspbian源

raspbian这个源是由独立开发者维护的,与树莓派基金会并无直接联系。国内源比较多,选择一个与自己延迟最小或连接速度最好或物理距离最短的即可。
无需担心各个软件源内容上会有不同,基本上各个站点每天都会同步一次,绝大部分情况下某软件安装不了与用了哪个站点提供的源无关。
通常位于/etc/apt/sources.list
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 
新加坡国立大学
deb http://mirror.nus.edu.sg/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

参考文章:
raspbian镜像列表https://www.raspbian.org/RaspbianMirrors

作者:qcsunny
链接:https://www.jianshu.com/p/67b9e6ebf8a0
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

猜你喜欢

转载自www.cnblogs.com/guyk/p/9235759.html