• 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软件源

    完毕。

  • 相关阅读:
    安装浏览器的vue插件
    webpack学习笔记-2-file-loader 和 url-loader
    webpack4.x最详细入门讲解
    简单地使用webpack进行打包
    vue动态监听浏览器窗口高度
    Vue 中 export及export default的区别
    vue 路由懒加载 resolve vue-router配置
    javascript深入理解js闭包
    JS截取字符串常用方法详细整理
    糗事之 -- 用ssh公钥实现免密码登录
  • 原文地址:https://www.cnblogs.com/-mrl/p/13409279.html
Copyright © 2020-2023  润新知