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

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

  • 相关阅读:
    《jmeter:菜鸟入门到进阶系列》
    Jmeter下载时Binaries和Source两类包的区别
    MySQL5.7 四种日志文件
    Windows下配置nginx+php(wnmp)
    回望2018,计划2019
    C# 单元测试(入门)
    C# 中out,ref,params参数的使用
    C# 程序运行中的流程控制
    Nacos(五):多环境下如何“读取”Nacos中相应的配置
    Nacos(四):SpringCloud项目中接入Nacos作为配置中心
  • 原文地址:https://www.cnblogs.com/ZhengPeng7/p/7217714.html
Copyright © 2011-2022 走看看