zoukankan      html  css  js  c++  java
  • 为 linux 换源

    为 linux 换源

    起因

    前段时间整了个树莓派,在使用 apt-get upgrade 的时候超级慢,然后意识到这树莓派所在的网络环境还是和vps有很大差距的,所以换源是必不可少的了。

    操作

    先查看一下apt默认源 /etc/apt/sources.list

    $(sudo) cp sources.list sources.list.bak
    $(sudo) sudo vim(或者vi之类的) sources.list
    

    我用的是raspbian,所以打开后大概内容是这样的

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

    正常情况下使用官方源会非常非常非常……慢

    这边建议使用中科大的源(有其他的源也可以)

    筛选一下,选择raspbian的源 https://mirrors.ustc.edu.cn/raspbian/raspbian/

    deb https://mirrors.ustc.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi
    

    把官方源改成中科大源即可

    然后就可以正常 upgrade 了!

  • 相关阅读:
    第四章5
    第四章4
    第四章3
    第四章2
    第四章1
    第四章例4-8
    第四章例4-7
    第四章例4-6
    第四章例4-5
    第四章例4-4
  • 原文地址:https://www.cnblogs.com/CollapseNav/p/12411262.html
Copyright © 2011-2022 走看看