• 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

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

  • 相关阅读:
    快速清除Word文档多余空行
    使用快照隔离
    hive 常用运算
    shell_Day02
    Study python_01
    Study python_02
    Windows server 2016 域服务1之创建域
    Study python_04
    shell_Day01
    Study python_03
  • 原文地址:https://www.cnblogs.com/ZhengPeng7/p/7217714.html
Copyright © 2020-2023  润新知