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. 关于.net中的脚本语言使用

    基于.net中drl框架的脚本现在有很多,最近也由于工作的需要,目前有lua.python.ruby.javascript的.net实现,对ruby不怎么了解,python.lua.js就成了试验的对 ...

  2. C语言的左位移能不能超过8位?

    C语言的左位移能不能超过8位?比如b=a<<20; 这样可以不?如果可以,一个字节只有8个位,左移20位是不是连右边其它字节的12个位(20-8)也一起左移? 字符变量左移八次后,所有的位 ...

  3. SQL 2008 R2 启动失败 提示 请求失败或服务未及时响应

    为什么启动sql server 配置管理器出现请求失败或服务未及时响应_百度知道 http://zhidao.baidu.com/link?url=ElemzIan6I2CqJsd7-7uk5TV25 ...

  4. CF339

    C. Xenia and Weights 有1...10k的砝码,在天枰上,左右轮流放置砝码,要求之后左右轮流比另一侧重量要大,要求相邻两次砝码不能相同. 解题报告给出(i,j,k)表示balance ...

  5. HDU1875——畅通工程再续(最小生成树:Kruskal算法)

    畅通工程再续 Description相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现.现在政府决定大力发展百岛湖,发展首先要解决的问题当 ...

  6. 基于redis实现的分布式锁

    基于redis实现的分布式锁 我们知道,在多线程环境中,锁是实现共享资源互斥访问的重要机制,以保证任何时刻只有一个线程在访问共享资源.锁的基本原理是:用一个状态值表示锁,对锁的占用和释放通过状态值来标 ...

  7. IIS7 发布mvc3.0

    Windows7系统和我们见面已经有一段时间了,在我们经过一段时间熟悉了她的新鲜好玩儿的功能之后,也许我们该静下心来想一下怎么用她做一些与学习有 关的事情,从Windows7的第一个试用版到现在的零售 ...

  8. ListView使用CursorAdapter增加和删除item

    @Override protected void onCreate(Bundle savedInstanceState) { // TODO 自动生成的方法存根 super.onCreate(save ...

  9. [原]Unity3D深入浅出 - 光源组件(Light)

    Unity中提供了四种光源: Directional light: 方向光,类似太阳的日照效果. Point light: 点光源,类似蜡烛. Spotlight: 聚光灯,类似手电筒. Area L ...

  10. Adobe RIA

    一:1)Adobe® Flash® Player 是一个跨平台.基于浏览器的应用程序运行时,它可以跨屏幕和浏览器.原汁原味地呈现具有表现力的应用程序.内容和视频,当前版本Flash Player 10 ...