xmodulo.com/how-to-fix-apt-get-update-error-on-ubuntu.html

如果是依赖没找到,可以用 sudo apt-get install -f 先补齐依赖看行不行。

1、先使用:

$ sudo rm -rf /var/lib/apt/lists/*
$ sudo apt-get update

如果不行,再使用:

2、

$ sudo rm -R /var/lib/apt/lists/partial/*
$ sudo apt-get update

如果还不行,则

3、

Then check out the "End of Life" date of your Ubuntu release by referring to https://wiki.ubuntu.com/Releases

如果你的ubuntu版本已经 end of life了,则表示不再被支持,即软件库、更新库就不可用了

但是你可以使用 old-releases

ask.xmodulo.com/404-not-found-error-apt-get-update-ubuntu.html

Every Ubuntu release has its end-of-life (EOL) time; regular Ubuntu releases are supported for 18 months, while LTS (Long Term Support) versions are supported up to 3 years (server edition) and 5 years (desktop edition). Once a Ubuntu release has reached EOL, its repositories will no longer be accessible, and you won't get any maintenance updates and security patches from Canonical. As of this writing, Ubuntu 13.04 (Raring Ringtail) has already reached EOL.

If the Ubuntu system you are using is EOL-ed, you will get the following 404 errors from apt-get or aptitude as its repositories have been deprecated.

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/raring-backports/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/raring/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/universe/binary-i386/Packages  404  Not Found [IP: 91.189.88.149 80]

E: Some index files failed to download. They have been ignored, or old ones used instead
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/utopic-security/main/source/Sources  404  Not Found

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/utopic-security/restricted/source/Sources  404  Not Found

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/utopic-security/universe/source/Sources  404  Not Found

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/utopic-security/multiverse/source/Sources  404  Not Found

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/utopic-security/main/binary-amd64/Packages  404  Not Found

For those users who are using old versions of Ubuntu, Canonical maintains old-releases.ubuntu.com, which is an archive of EOL-ed repositories. Thus, when Canonical's support for your Ubuntu installation ends, you need to switch to repositories at old-releases.ubuntu.com (unless you want to upgrade it before EOL).

Here is a quick way to fix "404 Not Found" errors on old Ubuntu by switching to old-releases repositories.

First, replace main/security repositories with old-releases versions as follows.

$ sudo sed -i -r 's/([a-z]{2}\.)?archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
$ sudo sed -i -r 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

Then open /etc/apt/sources.list with a text editor, and look for extras.ubuntu.com. This repository is also no longer supported for 13.04. So you need to comment out extras.ubuntu.com by prepending '#' sign.

#deb http://extras.ubuntu.com/ubuntu raring main
#deb-src http://extras.ubuntu.com/ubuntu raring main

Now you should be able to install or update packages on an old unsupported Ubuntu release.

4、大多数时候采用 sudo add-apt-repository  ***  添加的repo source,很多时候在 apt-get update 的时候都会失败,可以这样删掉刚添加的repo:

sudo add-apt-repository ppa:whatever/ppa
sudo apt-get update ....fail..... sudo add-apt-repository --remove ppa:whatever/ppa

ubuntu 的 apt-get update 出现404错误时,ubuntu 版本也 end of life 了的解决方案的更多相关文章

  1. ubuntu 的 apt-get update 出现404错误时,或者添加ppa失败时,ubuntu 版本也 end of life 了的解决方案

    xmodulo.com/how-to-fix-apt-get-update-error-on-ubuntu.html 如果是依赖没找到,可以用 sudo apt-get install -f 先补齐依 ...

  2. flexpaper上传带中文名字的文档,在页面显示若出现404错误时,请在server.xml文件中进行编码utf-8

    flexpaper上传带中文名字的文档,在页面显示若出现404错误时,请在server.xml文件中进行编码utf-8

  3. ubuntu下sudo apt-get update Sources 404 Not Found 解决方法

    刚安装了ubuntu之后的主要安装命令无非就是apt-get install了,然而很多都在这里就夭折了. 使用apt-get install ***需要先执行apt-get update 加载文件包 ...

  4. ubuntu安装软件失败,出现404错误,更新软件源

    更新源方法 备份原来的源 首先备份原来的源,用来出错后进行恢复 sudo cp /etc/apt/sources.list/etc/apt/sources.list_backup 1 如果更新源后出错 ...

  5. Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.

    报错命令 root@ubuntu:/etc/apt# apt-get update Err: http://mirrors.aliyun.com/ubuntu trusty InRelease Cou ...

  6. Servlet3.0 jsp跳转到Servlet 出现404错误的路径设置方法

    最近又遇到了这种问题,百度了好久,发现有人说要在action的路径里面写Servlet文件的绝对路径,比如说,单独打开servlet的地址为http://localhost:8080/TomcatTe ...

  7. IIS7.0设置404错误页,返回500状态码

    一般在II6下,设置自定义404错误页时,只需要在错误页中选择自定义的页面,做自己的404页面即可.但是在IIS7.0及以上时,设置完404错误页后,会发现状态码返回的是500,并且可能会引起页面乱码 ...

  8. iis设置404错误页,返回500状态码

    一般在II6下,设置自定义404错误页时,只需要在错误页中选择自定义的页面,做自己的404页面即可.但是在IIS7.0及以上时,设置完404错误页后,会发现状态码返回的是500,并且可能会引起页面乱码 ...

  9. ASP.NETCore统一处理404错误都有哪些方式?

    当未找到网页并且应用程序返回 404 错误时,ASP.NET Core MVC 仅呈现通用浏览器错误页面,如下图所示 这不是很优雅,是吗? 我们平时看到的404页面一般是这样的 还有这样的 试了下京东 ...

随机推荐

  1. Unity寻路的功能总结

    源地址:http://blog.csdn.net/sgnyyy/article/details/21878163 1. 利用Unity本身自带的NavMesh 这篇文章已经比较详细,可能对于很多需要a ...

  2. hdu 4577 X-Boxes 大数

    java水过…… 代码如下: import java.math.*; import java.util.*; public class Main { public static void main(S ...

  3. Mac OS X 启用 Web 服务器

    转载: http://note.rpsh.net/posts/2013/11/26/osx-apache-server-php-mysql/

  4. [itint5]二叉树转换线索二叉树

    http://www.itint5.com/oj/#27 用了基于stack的中序遍历,记录一下last,就很简单了. #include <stack> /*树结点的定义(请不要在代码中定 ...

  5. QT小技巧(书上没有的)

    1. Layout本身不能控制隐藏和显示,但是可以在外面专门套一个Widget,然后控制这个Widget就可以达到相应的效果了. 2. 空目录居然也存在 if (QDir(""). ...

  6. devfs,proc,udev

    devfs:常用的驱动函数封装 proc:在用户态检查内核状态的机制 udev 和 devfs相比? 一个是用户空间里的,一个运行在内核空间且被2.6以后版本抛弃了

  7. Complete The Pattern #6 - Odd Ladder

    Complete The Pattern #6 - Odd Ladder Task: You have to write a function pattern which creates the fo ...

  8. 腾讯TDW:大型Hadoop集群应用[转载]

    转自:http://www.uml.org.cn/sjjm/201508103.asp  作者:Uri Margalit 来源:InfoQ 发布于:2015-8-10 TDW(Tencent dist ...

  9. IDE模式下安装Windows 7强行改回ACHI后不断重启的解决方法

    问题描述:用U盘启动进PE装的Win7,由于PE认不出硬盘,只好进BIOS设置硬盘模式为IDE才安装上.结果安装完系统后,在BIOS中强行修改硬盘模式为ACHI模式后,Win7开机不断重启,进不了系统 ...

  10. UVa 12171 (离散化 floodfill) Sculpture

    题意: 三维空间中有n个长方体组成的雕塑,求表面积和体积. 分析: 我们可以在最外边加一圈“空气”,然后求空气的连通块的体积,最后用总体积减去即是雕塑的体积. 还有一个很“严重”的问题就是5003所占 ...