钻磊博客

钻磊博客
zlrsl

如何给树莓派更换软件源

树莓派

在树莓派上安装软件时候,经常遇到无法找到软件包或者下载速度过慢等情况,这时候我们需要更换软件源。

  1. 首先,打开/etc/apt/sources.list
    sudo nano /etc/apt/sources.list
  2. 用#注释掉旧源,方法将
  3. deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib$
    deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main con$
    #deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
    # Uncomment line below then 'apt-get update' to enable 'apt-get source'
    #deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-fre$
    改为
    #deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib$
    #deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main con$
    #deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
    # Uncomment line below then 'apt-get update' to enable 'apt-get source'
    #deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-fre$
    
  4. 更换新源,将如下源任选其一粘贴进去
  5. 1.阿里云提供

    deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main contrib non-free rpi
    deb-src http://mirrors.aliyun.com/raspbian/raspbian/ jessie main contrib non-free rpi
    2.中科大提供
    deb http://mirrors.ustc.edu.cn/raspbian/raspbian/   wheezy main contrib non-free rpi
  6. 更新软件源
    sudo apt-get upgrade

×

感谢您的支持,我们会一直保持!

扫码支持
请土豪扫码随意打赏

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

打赏作者
版权所有,转载注意明处:钻磊博客-这是一个涨知识的网站(www.zlrsl.cn)|技术教程|资源分享|美文分享|钻磊人生路 » 如何给树莓派更换软件源
标签: 树莓派

网友评论(0)