花了些时间整理了目前最新的树莓派中国大陆地区的软件源,记下来,希望对大家有帮助。
中国科学技术大学
Raspbian http://mirrors.ustc.edu.cn/raspbian/raspbian/
阿里云
Raspbian http://mirrors.aliyun.com/raspbian/raspbian/
清华大学
Raspbian http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/
华中科技大学
Raspbian http://mirrors.hustunique.com/raspbian/raspbian/
Arch Linux ARM http://mirrors.hustunique.com/archlinuxarm/
华南农业大学(华南用户)
Raspbian http://mirrors.scau.edu.cn/raspbian/
大连东软信息学院源(北方用户)
Raspbian http://mirrors.neusoft.edu.cn/raspbian/raspbian/
重庆大学源(中西部用户)
Raspbian http://mirrors.cqu.edu.cn/Raspbian/raspbian/
中山大学 已跳转至中国科学技术大学源
Raspbian http://mirror.sysu.edu.cn/raspbian/raspbian/
新加坡国立大学
Raspbian http://mirror.nus.edu.sg/raspbian/raspbian
牛津大学
Raspbian http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/
韩国KAIST大学
Raspbian http://ftp.kaist.ac.kr/raspbian/raspbian/
使用说明
备份原始文件(可选步骤)
1 2 | 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 |
编辑软件源配置
1、编辑 /etc/apt/sources.list 文件(软件源),参考如下命令:
1 | sudo nano /etc/apt/sources .list |
2、删除原文件所有内容,buster 系统用以下内容取代:
1 2 | deb http://mirrors.sysu.edu.cn/raspbian/raspbian/ buster main contrib non-free deb-src http://mirrors.sysu.edu.cn/raspbian/raspbian/ buster main contrib non-free |
注:网址末尾的raspbian重复两次是必须的。因为Raspbian的仓库中除了APT软件源还包含其他代码。APT软件源不在仓库的根目录,而在raspbian/子目录下。
stretch 系统用以下内容取代:
1 2 | deb http://mirrors.sysu.edu.cn/raspbian/raspbian/ stretch main contrib non-free deb-src http://mirrors.sysu.edu.cn/raspbian/raspbian/ stretch main contrib non-free |
jessie 用以下内容取代:
1 2 | deb http://mirrors.sysu.edu.cn/raspbian/raspbian/ jessie main contrib non-free deb-src http://mirrors.sysu.edu.cn/raspbian/raspbian/ jessie main contrib non-free |
wheezy 用以下内容取代:
1 2 | deb http://mirrors.sysu.edu.cn/raspbian/raspbian/ wheezy main contrib non-free deb-src http://mirrors.sysu.edu.cn/raspbian/raspbian/ wheezy main contrib non-free |
Ctrl+o 保存,之后回车确认,然后 Ctrl+x 退出。
编辑系统源配置
1、编辑 /etc/apt/sources.list.d/raspi.list 文件(系统更新源),参考如下命令:
1 | sudo nano /etc/apt/sources .list.d /raspi .list |
2、同样修改首行网址,修改后文件如下:
1 2 3 | 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 |
jessie、wheezy 版本的系统按照之前修改软件源的的规则修改即可,这里不再赘述。
Ctrl+o 保存,之后回车确认,然后 Ctrl+x 退出。
更新
配置好了可以尝试更新,用下面的命令分别更新软件源列表、软件版本和系统内核版本,完整的更新过程需要等挺久的。一般只用更新软件源列表即可。
1 2 3 4 5 6 7 | #更新软件源列表 sudo apt-get update #更新软件版本 sudo apt-get upgrade sudo apt-get dist-upgrade #更新系统内核 sudo rpi-update |
如果需要,你可以执行以下命令将Raspbian public key加入你的 apt-get keyring :
1 | wget http: //archive .raspbian.org /raspbian .public.key -O - | sudo apt-key add - |
2015.11.23 add a update from comments:
现在版本升级了,版本号要更改,把 wheezy 改成 jessie 这样大部分源是在中国,不然像楼上那样升级,大部分源在国外。2019.3.7 add a update:
添加系统更新源(/etc/apt/sources.d/raspi.list)的步骤。
转载链接:https://shumeipai.nxez.com/2013/08/31/raspbian-chinese-software-source.html
版权声明
1.本站大部分下载资源收集于网络,不保证其完整性以及安全性,请下载后自行测试。
2.本站资源仅供学习和交流使用,版权归资源原作者所有,请在下载后24小时之内自觉删除。
3.若作商业用途,请购买正版,由于未及时购买和付费发生的侵权行为,与本站无关。
4.若内容涉及侵权或违法信息,请联系本站管理员进行下架处理,邮箱ganice520@163.com(本站不支持其他投诉反馈渠道,谢谢合作)
发表评论