zoukankan      html  css  js  c++  java
  • ubuntu 更换数据源

    ubuntu16.04LTS更换阿里源

    1.直接在原文件中修改
    sudo vim /etc/apt/sources.list
    替换:

    # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
    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

    2. 在etc/apt中找到source.list文件下载到本地

      用新的数据源替换原来的内容,保存,因为没有权限的问题,所有先把修改后的文件上传到home/ubuntu/目录下 ,

      执行 sudo cp -r /home/ubuntu/source.list /etc/apt/source.list (替换掉etc/apt下的source.list文件)
    更新:
    sudo apt-get update

    如果报以下类似的错误,是因为解析域名不成功

    Err:1 http://archive.canonical.com/ubuntu xenial InRelease
    Temporary failure resolving 'archive.canonical.com'

    此时运行:sudo vim /etc/resolv.conf

    添加:nameserver 8.8.8.8

    即可

  • 相关阅读:
    IB(InterBase Server) 的完整连接格式
    jna
    编写基于Prototype的Javascript动画类
    Go——使用 go mod ——有依赖的Go工程
    pkgconfig—— PKG_CONFIG_PATH——Makefile——pkgconfig的作用与使用
    Go——Goland Debug报错Version of Delve is too old for this version of Go
    NATS——NATS Streaming 是什么 (转)
    Go——Go语言调用C语言
    go get安装包超时处理
    NATS—基础介绍 (转自 https://www.cnblogs.com/yorkyang/p/8392172.html)
  • 原文地址:https://www.cnblogs.com/browse/p/13463790.html
Copyright © 2011-2022 走看看