最新公告
  • 欢迎光临icbug创客,本站所有的文章全部开放!部分资源需付费!立即加入我们会员
  • Ubuntu apt换国内源

    注意:本文所有操作都是以root权限进行操作

    本次教程使用Ubuntu20.02系统

    首先备份原先的源

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

    更换源:

    编辑文件

    vim /etc/apt/sources.list

    把里面的所有内容替换为如下:

    #deb包
    deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
    ##测试版源  
    deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
    # 源码  
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
    ##测试版源  
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
    # Canonical 合作伙伴和附加  
    deb http://archive.canonical.com/ubuntu/ xenial partner
    deb http://extras.ubuntu.com/ubuntu/ xenial main
    

    然后我们执行更新

     apt-get update

    然后我们把损坏和出错的源码包让他重新安装一遍

    apt-get -f install

    更新软件源:

    apt-get upgrade
    icbug创客严格遵守文章协议!请勿侵犯作者权益复制直接转载,如需转载请标明出处!
    icbug创客 » Ubuntu apt换国内源

    发表评论

    • 650会员总数(位)
    • 189资源总数(个)
    • 3本周发布(个)
    • 0 今日发布(个)
    • 224稳定运行(天)

    提供最优质的资源集合

    立即查看 了解详情