美文网首页
解决 Ubuntu apt-get update 太慢的问题

解决 Ubuntu apt-get update 太慢的问题

作者: 皮皮灬 | 来源:发表于2019-11-03 16:12 被阅读0次

    ubuntu 下经常需要更新源,非常慢,可以通过替换源列表文件的方式来加速,步骤:

    1.备份源列表文件

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
    

    2.修改源列表

    /etc/apt/sources.list 内容替换为:

    deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
    deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
    deb http://mirrors.aliyun.com/ubuntu/ xenial universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
    deb http://archive.canonical.com/ubuntu xenial partner
    deb-src http://archive.canonical.com/ubuntu xenial partner
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
    

    之后执行 sudo apt-get update 就非常快了

    相关文章

      网友评论

          本文标题:解决 Ubuntu apt-get update 太慢的问题

          本文链接:https://www.haomeiwen.com/subject/mdflbctx.html