树莓派—raspbian软件源切换至国内源

缘起

    之前树莓派sb使用中科大的镜像(http://mirrors.ustc.edu.cn/),一直比较稳定,同时速度也很快。


    最近发现中科大的源release源不可用,apt update的错误日志如下:

命中:1 
https://mirrors.ustc.edu.cn/raspbian/raspbian stretch InRelease
忽略:2 
https://mirrors.ustc.edu.cn/archive.raspberrypi.org stretch InRelease
错误:3 
https://mirrors.ustc.edu.cn/archive.raspberrypi.org stretch Release
 404  Not Found
正在读取软件包列表... 完成
E: 仓库 “
https://mirrors.ustc.edu.cn/archive.raspberrypi.org stretch
 Release” 不再含有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。


    所以有了此次的文章,来总结下国内树莓派系统源镜像的情况,方便后续的切换。

    经过分析,最终选择的清华的镜像作为默认,原因不多说了,国内算是最大的镜像了。

    附:清华大学的镜像,有着恐怖的500+MB的流量带宽,77TB的磁盘,接近1000GB的内存,简直可怕。详细信息可以在这看到,https://mirrors.tuna.tsinghua.edu.cn/status/#server-status


流量磁盘

内存cpu

折腾经过

    经过不多说了,参考自https://www.jianshu.com/p/67b9e6ebf8a0,thx

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

/etc/apt/sources.list.d/raspi.list里的软件源是树莓派基金会单独(非Raspbian开发者)提供/维护的软件源,主要包括raspi-configminecraftpi树莓派桌面环境内核固件驱动等少量软件。
这个软件源相关资料比较少,国内目前只有清华(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

Jessie(三选其一即可)

中科大
deb https://mirrors.ustc.edu.cn/archive.raspberrypi.org/ jessie main ui清华
deb https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ jessie main ui默认官方源
deb http://archive.raspberrypi.org/debian/ jessie 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

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 新加坡国立大学
deb http://mirror.nus.edu.sg/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

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

https://www.jianshu.com/p/67b9e6ebf8a0


发表评论

必填

选填

选填

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。