• Ubuntu更换源


      最近在Ubuntu上学习是遇到很多问题,预算开始更新源了

    话不多说;

    1.备份原来的源

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

      将以前的源备份一下,以防以后可以用的。

    2.更换源

    sudo gedit /etc/apt/sources.list
    

    使用gedit打开文档,将下边的阿里源复制进去,然后点击保存关闭。

    阿里源

    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
     
    ---------------------  
    3.更新

    更新源

    sudo apt-get update


    复损坏的软件包,尝试卸载出错的包,重新安装正确版本的。

    sudo apt-get -f install



    更新软件

     sudo apt-get upgrade

      

    4.其他常用源

    清华源

    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
     
    ---------------------  

    网易源


    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

    原文:https://blog.csdn.net/qq_35451572/article/details/79516563  

  • 相关阅读:
    sql 查询当前数据库所有表格以及所有表格数据条数
    MVC AjaxOptions 中的OnSuccess方法执行多次的问题
    已知当前地理位置经纬度查询几个点中最近的一个地点demo
    微信分享ios设备没有分享图标安卓有分享图标 (分享功能没有问题)
    摇一摇js 实现
    linq 的switch实现
    启动服务器脚本
    关于网站的优化
    Ubuntu纯命令行安装并配置Teamviewer
    在Jupyter中使用自定义conda环境
  • 原文地址:https://www.cnblogs.com/loufangcheng/p/10799852.html
Copyright © 2020-2023  润新知