zoukankan      html  css  js  c++  java
  • unbutu apt-get update失败及解决办法

    今天在用apt-get update更新时一直失败,报的错误为”Failed to fetch 404 Not Found”,因为我的镜像改为了mirrors.aliyun.com 我试着ping了一下发现能通,所以就在网上查找了下答案

    大部分的解释是因为每个Ubuntu版本都有生命结束周期(EOL)时间;常规的Ubuntu发行版提供18个月的支持,而LTS(长期支持)版本则长达3年(服务器版本)和5年(桌面版本)。当某个Ubuntu版本达到生命结束周期时,其仓库就不能再访问了,你也不能再从Canonical获取任何维护更新和安全补丁。在撰写本文时,Ubuntu 13.04(急切的浣熊)已经达到了它的生命结束周期。

    如果你所使用的Ubuntu系统已经被结束生命周期,你就会从apt-get或aptitude得到以下404错误,因为它的仓库已经被遗弃了。

    解决方法为讲/etc/apt/sources.list路径下的源替换为旧版本仓库的源。

    BUT,我的镜像是阿里云的镜像,貌似没有什么旧版本的路径,我就在/etc/apt/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
    

      再执行apt-get update就好了

    如果还有问题,参考下面的两个方法

    https://www.laozuo.org/11110.html

    https://yq.aliyun.com/articles/87106

     

  • 相关阅读:
    Linux crontab 命令格式与举例
    my sql 两个 索引 时的 union 与 or 的比较
    网络通信5层传输
    算法 韩信点兵 循环左移数组元素
    sql 提升查询效率 group by option hash group
    微信引流活动:生成带参二维码、发送海报、
    PMP十大知识领域整理
    iis 站点中文乱码 解决方案
    pdb文件及引发的思考
    TFS 创建团队成员及管理
  • 原文地址:https://www.cnblogs.com/wangshaowei/p/10994764.html
Copyright © 2011-2022 走看看