Jocke的IOT之路--raspberrypi更换国内镜像

一、编辑sources.list文件

sudo nano /etc/apt/sources.list

  使用#将文件内容全部注释调,更改位

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

  这个是清华开源镜像也可以是其他镜像

#科大源
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ jessie main contrib non-free rpi

  这个是科大

二、同样使用sudo 编辑raspi.list文件

sudo nano /etc/apt/sources.list.d/raspi.list

  #注释掉所有

deb http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui
deb-src http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui

  

注意: 网址末尾的raspbian重复两次是必须的。因为Raspbian的仓库中除了APT软件源还包含其他代码。APT软件源不在仓库的根目录,而在raspbian/子目录下。

编辑镜像站后,请使用sudo apt-get update命令,更新软件源列表,同时检查您的编辑是否正确。

使用HTTPS可以有效避免国内运营商的缓存劫持,但需要事先安装apt-transport-https

整理目前国内镜像

中国科学技术大学
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/

posted @ 2018-12-20 16:45  JockeChen  阅读(263)  评论(1编辑  收藏  举报