zoukankan      html  css  js  c++  java
  • Ubuntu更改apt源为阿里云源

    编辑源列表文件

    $ vim /etc/apt/sources.list

    查看新版本信息

    $ lsb_release -c

    ubuntu版本的系统代号

    Ubuntu 12.04 (LTS)代号为precise

    Ubuntu 14.04 (LTS)代号为trusty

    Ubuntu 15.04 代号为vivid

    Ubuntu 15.10 代号为wily

    Ubuntu 16.04 (LTS)代号为xenial

    将原有的内容注释掉,添加以下内容(或者你把里面内容修改成下面的就可以,但是不能有除了以下内容的有效内容)

    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-backports main restricted universe multiverse
    
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports 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

    ps.知道我为什么说版本号吗?只要把我的版本号bionic改成你的版本号就能用了

    #更新软件列表
    $ sudo apt-get update
    
    #更新软件包
    $ sudo apt-get upgrade
  • 相关阅读:
    request.getParameterMap 跟request.getParameter区别
    SQL语句中---删除表数据drop、truncate和delete的用法
    今日出现两个错误
    html和jsp的区别及优缺点
    怎么将 美国的日期格式改成中国的日期格式
    java web相关的面试题
    i++与++i的关系
    Oracle常见的语法,以及跟MySQL的区别
    DBA
    java基础之印象笔记
  • 原文地址:https://www.cnblogs.com/ydymz/p/14224519.html
Copyright © 2011-2022 走看看