【Raspberry Pi - Raspbian】系统换更新源

a. 编辑/etc/apt/source.list

    命令: sudo nano /etc/apt/source.list 

        or   sudo vim /etc/apt/source.list

        or   sudo gedit /etc/apt/source.list

    用哪个命令取决于你安装了哪个,并且熟悉哪个

    我这里用的nano命令看到raspbian自带的源如下:


    然后把他们都delete或者全部注释掉,continue...

b. 添加新源

    deb <源地址> wheezy main contrib non-free

    deb-src <源地址> wheezy main contrib non-free

    举个栗子:

    源地址为清华镜像:http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/

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

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

    顺手给出官方给出的镜像链接:http://www.raspbian.org/RaspbianMirrors

    咱们中国镜像:



c. 换源成功

    老套路,完事了你首先得

        sudo apt update

    然后

        sudo apt upgrade


参考:https://www.ncnynl.com/archives/201607/255.html

猜你喜欢

转载自blog.csdn.net/lgh0824/article/details/80146923