zoukankan      html  css  js  c++  java
  • ubuntu apt-get下载慢 解决办法

    由于安装的Ubuntu  LTS是英文版的,软件源就默认都是 us.archive.ubuntu.com(英国) 的,所以很慢

    为了提高下载速度,将源改为国内的 cn.archive.ubuntu.com ,现在 cn.archive.ubuntu.com 指向阿里云的开源镜像站 mirrors.aliyun.com,下载速度很快。

    ubuntu 18.04(bionic) 配置如下:

    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

    在ubuntu下执行命令 sudo mv /etc/apt/sources.list /etc/apt/sources.list_backup 将 sources.list 文件备份

    执行 sudo vi /etc/apt/sources.list 编辑 sources.list 文件,有内容则将文件内容清空,并粘贴上面的内容,保存退出

    执行 sudo apt-get update 更新apt软件源

    完毕。

  • 相关阅读:
    Oracle的序列、视图、索引和表空间
    MySQL存储过程
    MySQL触发器
    MySQL索引和视图
    完整性约束
    Mybatis的核心对象及运行流程
    Mybatis中配置连接池
    IDEA中创建Maven工程整合Mybatis
    Idea中创建JavaWeb工程
    实现整数集合的并、交、差运算
  • 原文地址:https://www.cnblogs.com/-mrl/p/13409279.html
Copyright © 2011-2022 走看看