• 为 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 了!

  • 相关阅读:
    A 第一课 链表
    CSS基础_01:
    html基础(2)
    冒泡_选择算法
    高等数学以及Python 实现
    ubuntu18.04 镜像下载
    MatplotLib 第二部分
    一件很好笑的事情
    HIVE文件
    一个关于消息结构体的讨论
  • 原文地址:https://www.cnblogs.com/CollapseNav/p/12411262.html
Copyright © 2020-2023  润新知