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

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

  • 相关阅读:
    JavaScript测试工具chai
    gradle初始仓库依赖(含junit)
    汇编和中断
    oracle-12c-ee安装
    pickle
    Python (zip, lambda, map, shallow copy, deepcopy)
    豆瓣源下载tensorflow
    Linux上XRDP可作为WIN的远程连接
    VNC连接远程Linux——废弃电脑作为运算机器
    MACOS 运行Keras报错
  • 原文地址:https://www.cnblogs.com/ZhengPeng7/p/7217714.html
Copyright © 2011-2022 走看看