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

    本文转载自:http://www.jianshu.com/p/0de2b5717ce8

    1 $ sudo  apt-get update
    
    报了一堆错误:
    
    Err http://cn.archive.ubuntu.com trusty InRelease
    
    Err http://cn.archive.ubuntu.com trusty-updates InRelease
    
    Err http://cn.archive.ubuntu.com trusty-backports InRelease
    
    Err http://cn.archive.ubuntu.com trusty Release.gpg     
    
    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty/InRelease

    解决方案: 修改DNS

    sudo vi  /etc/resolvconf/resolv.conf.d/base

    在里面插入:

    nameserver 8.8.8.8
    nameserver 8.8.4.4

    修改好保存!wq,
    然后执行

    $ sudo resolvconf -u

    再看 /etc/resolv.conf,最下面就多了2行:

    $ cat /etc/resolv.conf

     显示

    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by   resolvconf(8)
    
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    
    nameserver 8.8.8.8
    
    nameserver 8.8.4.4

    此时执行

    $ sudo  apt-get update

    可以运行,然后就可以使用sudo apt-get install **指令了。

  • 相关阅读:
    jmeter参数化关联
    电商
    mysql联查
    购物车
    冒泡排序、二分查找、选择排序、斐波那契
    python数据转换/9*9表/for循环
    python三角形
    mysql语句
    Selenium 8
    Selenium 7
  • 原文地址:https://www.cnblogs.com/zzb-Dream-90Time/p/6681383.html
Copyright © 2011-2022 走看看