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错误时,或者添加ppa失败时,ubuntu 版本也 end of life 了的解决方案的更多相关文章

  1. ubuntu 的 apt-get update 出现404错误时,ubuntu 版本也 end of life 了的解决方案

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

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

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

  3. 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 ...

  4. 在Ubuntu下运行 apt-get update命令后出现错误:

    在Ubuntu下运行 apt-get update命令后出现错误: The package lists or status file could not be parsed or opened sud ...

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

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

  6. Ubuntu用sudo apt-get update出错:E: Problem executing scripts APT::Update::Post-Invoke-Success

    Ubuntu用sudo apt-get update出错:   E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /u ...

  7. 在ubuntu上面安装phpmyadmin后,报404错误

    安装完mysql后,我想装一个phpmyadmin方便mysql管理. 在终端执行命令:sudo apt-get install libapache2-mod-auth-mysql phpmyadmi ...

  8. Ubuntu 16.04系统下出现E: 无法下载 http://ppa.launchpad.net/fcitx-team/nightly/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found

    在安装完成Chrome浏览器后,终端执行以下更新命令 sudo apt-get update 时出现E: 无法下载 http://ppa.launchpad.net/fcitx-team/nightl ...

  9. The solution for apt-get update Err 404

    最近在ubuntu 12.10上执行sudo apt-get update 命令后出现了如下错误: Ign http://extras.ubuntu.com natty/main Translatio ...

随机推荐

  1. 【bzoj1565】 NOI2009—植物大战僵尸

    http://www.lydsy.com/JudgeOnline/problem.php?id=1565 (题目链接) 题意 给出$n*m$的棋盘,僵尸攻击每个格子可以获得$v$的分数,每个格子又会保 ...

  2. 洛谷P4843 清理雪道

    题意:给你DAG,求最小路径边覆盖.路径可重. 解:首先可以想到边转点,发现有n²条边,果断超时. 有源汇有上下界最小流. 建图:每条边都建立一条边,流量限制为[1, 1]. 源点向每个点连边,因为都 ...

  3. 20145215《网络对抗》Exp8 Web基础

    20145215<网络对抗>Exp8 Web基础 基础问题回答 什么是表单? 表单是一个包含表单元素的区域,表单元素是允许用户在表单中(比如:文本域.下拉列表.单选框.复选框等等)输入信息 ...

  4. ubuntu14.04 桌面版/服务器版安装DevStack教程

    官网安装教程链接:https://docs.openstack.org/developer/devstack/ 我在ubuntu14.04 LTS 桌面版/服务器版都安装DevStack成功后,在这里 ...

  5. Linux记录-普通用户下执行sudo xxx 找不到命令解决方案

    chmod 777 /etc/sudoers vim /etc/sudoers 1.可以使用 secure_path 指令修改 sudoers 中默认的 PATH为你想要的路径.这个指令指定当用户执行 ...

  6. Idea默认的全局设置,如Maven等

    每次使用IDEA打开一个新的项目,maven都需要重新配置,非常不开心,所以需要有个默认全局配置,打破不开心 配置完就OK了 公众号 欢迎关注我的公众号“码上开发”,每天分享最新技术资讯.最优原创文章 ...

  7. 获取客户端的请求IP地址

    获取客户端的请求IP地址 package com.microClass.util; import javax.servlet.http.HttpServletRequest; import java. ...

  8. DIV仿textarea文本域,contenteditable如何只能输入纯文本

    对于支持HTML5浏览器有2种方法: 1. HTML5 <div contenteditable="plaintext-only"></div> 2.  C ...

  9. .NET面试题系列(十四)锁

    锁 分布式锁 如何解决分布式锁超时问题 我们可以让获得锁的线程开启一个守护线程,用来给快要过期的锁“续航” 当过去了29秒,线程A还没执行完,这时候守护线程会执行expire指令,为这把锁“续命”20 ...

  10. C# PointToScreen

    子窗体定位时,如果主窗口不在左上角,需要根据主窗口的坐标,相减才行. Point p1 = Label.PointToScreen(new Point(0, 0)); p1.X -= this.X; ...