raspberry更换清华源

1.编辑sources.list文件;

命令:sudo vim /etc/apt/sources.list

2.注释掉已配置好的raspberry官方镜像,使用#号注释(或直接删除,哈哈)

3.添加清华源镜像:

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
4.修改raspi.list文件:

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

5.注释掉原内容,并以以下内容替换:

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

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

6.测试:

sudo apt-get update 

sudo apt-get upgrade

你可能感兴趣的:(raspberry)