树莓派 添加国内软件源

20,745 views次阅读
一条评论

官方Raspbian默认的自动更新的源连接速度太慢,更新常常失败,如何解决?

修改源的文件sources.list。输入如下命令:

sudo cp /etc/apt/sources.list /etc/apt/sources.list_bk

备份原来的文件然后再虐

sudo nano /etc/apt/sources.list

也可以用 VI 编辑看你自己喜欢(vi /etc/apt/sources.list

编辑sources文件,将里面的内容替换成

deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi

deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi

deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi

deb-src http://mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi

deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi

deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi

 

按ctrl+o保存,按ctrl+x退出,接着输入

sudo reboot

重启系统,完成之后

sudo apt-get update

 

 

PS. 国外的源其实也不错备份一下:

deb http://mirror.nus.edu.sg/raspbian/raspbian/ wheezy main contrib non-free rpi

deb-src http://mirror.nus.edu.sg/raspbian/raspbian/ wheezy main contrib non-free rpi

 


树莓派官方有提供一个镜像列表:http://www.raspbian.org/RaspbianMirrors

在里面找到了几个国内的镜像,经过几番尝试,觉得来自中科大的速度非常不错~ 咱们就换成中科大的吧

镜像主页:https://lug.ustc.edu.cn/wiki/mirrors/help/raspbian

 

正文完
 0
HopoL
版权声明:本站原创文章,由 HopoL 于2016-01-16发表,共计1096字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(一条评论)
whiteeyes 评论达人 LV.1
2016-10-31 02:32:59 回复

你好,请问你的网站有rss订阅吗?

 iPhone  Safari  中国山东省青岛市阿里云

HopoL's Blog

文章搜索
最新评论
Metaldololity Metaldololity Whoa, that's really simple. You just save my time a lot. Thankyou!
HopoL HopoL Since you’ve got the backup, it’s actually pretty simple. Just restore the backup files to your new flash drive, then head over to the /config directory and edit the go file. Look for export UNRAID_GUID=xxxxxxxxxxxxxx and swap it with your new drive's GUID. That should do the trick!
Metaldololity Metaldololity Really apreciate for your fast respond, mate. I actually have the backup of the flashdrive (from regular unraid backup). The problem is, when i search on youtube tutorial about changing the failed flashdrive, the process need some sort of confirmation with an account in unraid (blacklist the old one -> whitelist the new one). Since i have a cracked unraid, i don't know how to register my new flashdrive as the correct one (and the system not asking me for the old failed flashdrive). Thanks in advance
HopoL HopoL Man, that's a tough spot to be in. Regularly backing up your /boot folder is super important for exactly this reason. If you don't have a backup and your flash drive is completely fried, your best bet is to Google some specific recovery guides or check the Unraid forums. There are ways to rebuild your config by identifying your parity and data drives, but it can be a bit of a process. Hope you can get it sorted!
Metaldololity Metaldololity Hi! Huge thanks for the update on 7.2.0. I have question here, my flashdrive corrupted. how do i install it on the new flashdrive without losing all my configuration?