zoukankan      html  css  js  c++  java
  • Ubuntu apt-get update 失败

    apt-get碰上了”fetch http://……失败”, 自带源在国内连接性不好。

    解决:改用”阿里云Ubuntu源”:
    https://www.yurendu.com/code/16.html
    命令如下:

    1、备份

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

    2、修改源:

    sudo vim /etc/apt/sources.list 进入vim修改sources.list,在将如下代码:

    deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse 
    

    输入之前之前,把相对应的原有的源用#注释掉。

    3、更新列表, 成功

    sudo apt-get update

    本文版权归郑鹏(默盒)和博客园共有,原创文章,未经允许不得转载,否则保留追究法律责任的权利。

  • 相关阅读:
    postgresql删除活动链接的数据库
    第四篇 函数
    Jmeter响应中文乱码解决办法
    第三篇 条件控制和循环
    第二篇 Python运算符
    npm更换为镜像
    第一篇 Python的数据类型
    newman的常用命令使用总结
    windows下安装newman
    同态包络提取
  • 原文地址:https://www.cnblogs.com/ZhengPeng7/p/7217714.html
Copyright © 2011-2022 走看看