• ubantu添加阿里源


    1、备份

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

    2、编辑

    sudo gedit /etc/apt/sources.list  

    3、覆盖源文件的所有内容

    ubantu16.04:
    deb http://mirrors.aliyun.com/ubuntu/ xenial main
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main

    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main

    deb http://mirrors.aliyun.com/ubuntu/ xenial universe
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

    ubantu18.04:
    deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

    4、更新

    #升级软件列表
    sudo apt-get update 
    #系统将现有的Package升级,如果有相依性的问题,而此相依性需要安装其它新的Package或影响到其它Package的相依性时,此Package就不会被升级,会保留下来。
    #还有种说法时更新软件,但是会更新系统内核,大版本不变,不完全可靠的消息,没经过测试
    sudo apt-get upgrade
    #可以聪明的解决相依性的问题,如果有相依性问题,需要安装/移除新的Package,就会试着去安装/移除它。会识别出当依赖关系改变的情形并作出处理,而upgrade对此情形不处理。
    sudo apt-get dist-upgrade

    163源:

    可以尝试以下163的源,可能会意想不到的的快。

    deb http://mirrors.163.com/ubuntu/ wily main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ wily-security main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ wily-updates main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ wily-proposed main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ wily-backports main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ wily main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ wily-security main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ wily-updates main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ wily-proposed main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ wily-backports main restricted universe multiverse

    参考:

    http://mirrors.aliyun.com/(更多源参考阿里云官方提供的源列表)

    http://mirrors.163.com/(更多源参考163官方提供的源列表)

    http://blog.csdn.net/paincupid/article/details/52895676

    http://www.2cto.com/os/201301/183519.html

    http://www.baiyuxiong.com/?p=529、





  • 相关阅读:
    Python中yield和yield from区别
    Python基础05编码问题
    Python eval()函数
    Python异常大全
    Python基础08 内置函数
    Python os和sys模块基本操作
    git学习(3)-本地标签管理
    ubuntu 安装 node 以及升级更新到最新版本
    git学习(2)-分支管理
    git学习(1)-git基础
  • 原文地址:https://www.cnblogs.com/zjz20/p/12108219.html
Copyright © 2020-2023  润新知