VPS运维

Raspberry Pi 3 使用阿里云镜像云

2016-7-22 2398字 20,447


阿里开源镜像站提供了raspbian的软件包镜像,国内的用户可以选择改用阿里镜像站作为更新源。最新的jessie版可以参考本文。

具体做法

修改之前,最好先备份原始的配置文件。例如,使用如下命令将两个源配置文件拷贝到HOME目录。

cp /etc/apt/sources.list ~
cp /etc/apt/sources.list.d/raspi.list ~

或者直接在原来配置文件的基础上修改,但将原有的配置全部注释掉(使用#注释)。

修改 sources.list

更新后的/etc/apt/sources.list:

#deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

# use ustc mirror:
deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main contrib non-free rpi

实际修改是,将 mirrordirector.raspbian.org 替换为 mirrors.aliyun.com/raspbian/

修改 raspi.list

ps:阿里没有对应的镜像源,所以采用中科大的源 ( 多谢@skywfan修正)

更新后的/etc/apt/sources.list.d/raspi.list:

#deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ jessie main ui

# use ustc mirror:
deb-src http://mirrors.ustc.edu.cn/archive.raspberrypi.org/ wheezy main contrib non-free rpi

update

更换了软件源之后,需要update

sudo apt-get update

更多镜像源

#大连东软信息学院(北方用户)
#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/archive.raspberrypi.org/ wheezy main contrib non-free rpi

#清华大学
#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.cqu.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
#deb-src http://mirrors.cqu.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi

#前面几个都是教育网的

#搜狐
#deb http://mirrors.sohu.com/raspbian/raspbian/ wheezy main contrib non-free rpi
#deb-src http://mirrors.sohu.com/raspbian/raspbian/ wheezy main contrib non-free rpi
版权声明:Shire 发表于 2016-7-22
转载请注明: Raspberry Pi 3 使用阿里云镜像云 | Shire

评论

该文章已经关闭评论