Ubuntu 解决:当执行sudo apt-get update或者sudo apt-get install命令是出现的 “apt-get 404 Not Found Package Repository Errors” 问题 和 “E: Some index files failed to download They have been ignored, or old ones used” 问题

当你执行sudo apt-get update命令的时候,如果你遇到下面的问题:

W: The repository 'http://ppa.launchpad.net/ackondro/tibesti/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/ackondro/tibesti/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

或者

W: The repository 'http://ppa.launchpad.net/ackondro/tibesti/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/ackondro/tibesti/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

解决方法

首先,我们将现在出问题的 /etc/apt/sources.list 文件备份一份。(只是一个好习惯而已)

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

注: /etc/apt/sources.list 文件 里面存放的是 Linux系统需要的软件源的网站。

接着,我们重新编写一个 /etc/apt/sources.list 文件:

sudo gedit /etc/apt/sources.list

将下面的模板内容,复制粘贴到 /etc/apt/sources.list 文件里面后,保存就可以了:(我们使用的Ubuntu 是16.04)

deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse

如要用于其他版本,把 xenial 换成版本代号就好:

16.04

xenial(模板详细内容

15.10

willy(模板详细内容

14.04

trusty(模板详细内容

12.04

precise(模板详细内容

现在,再执行:

sudo apt-get update

现在就没有“apt-get 404 Not Found Package Repository Errors” 问题了。

小结:

这个问题,解决方法简单,但是对于初学者来说,却是一个触手的问题。


出现这个问题的原因是: 之前 /etc/apt/sources.list 路径里面的软件源更新网站有的已经过时了,需要更新新的网站。


Unable to connect to cn.archive.ubuntu.com:http: [112.124.140.210 80]

如果你出现这样的错误,说明你的网断了,查看网络连接情况。


参考网站:

How to fix Ubuntu/Debian apt-get 404 Not Found Package Repository Errors (Saucy, Raring, Quantal, Oneiric, Natty…)

https://smyl.es/how-to-fix-ubuntudebian-apt-get-404-not-found-package-repository-errors-saucy-raring-quantal-oneiric-natty/

Ubuntu apt-get unable to fetch packages

http://stackoverflow.com/questions/30316812/ubuntu-apt-get-unable-to-fetch-packages

源列表

http://wiki.ubuntu.org.cn/%E6%BA%90%E5%88%97%E8%A1%A8

Ubuntu 解决:当执行`sudo apt-get update`命令时 出现的 “apt-get 404 Not Found Package Repository Errors” 问题的更多相关文章

  1. Ubuntu/Debian apt-get 404 Not Found Package Repository Errors,无法找到包的错误

    最简单最常用的方法是,使用如下命令更新到新的版本: sudo apt-get dist-upgrade 但是这个方法有时候不一定能起作用,那么可以使用以下直接替换的命令: sudo sed -i -e ...

  2. ceph-deploy install时,远端节点在执行apt-get update命令时失败

    环境 OS:Ubuntu 16.04 背景 使用ceph-deploy部署Ceph集群,调用ceph-deploy install命令在远端节点安装ceph环境,执行apt-get update命令时 ...

  3. ubuntu -- 不输入密码执行sudo

    作为ubuntu等桌面系统,默认登录的帐号是没有root权限的,为了提升权限来执行任务,我们一般用到 "sudo+命令" 来执行,但是不难发现我们 一般都要输入密码.那么有没有什么 ...

  4. MTK平台环境搭建---Ubuntu Linux 下执行sudo apt-get install提示“现在没有可用的软件包……

    问题描述: sudo apt-get install openssh-server 正在读取软件包列表... 完成正在分析软件包的依赖关系树 Reading state information... ...

  5. Ubuntu不输入密码执行sudo命令方法介绍

    作为ubuntu等桌面系统,默认登录的帐号是没有root权限的,为了提升权限来执行任务,我们一般用到sudo+命令来执行,但是不难发现我们一般都要输入密码.那么有没有什么方法可以让我们执行sudo的时 ...

  6. Ubuntu 16.04执行 sudo apt-get update非常慢解决方案

    ubuntu在执行更新apt包索引 sudo apt-get update 可能遇到更新非常慢或者部分包都忽略或错误 我们应该进入到系统设置>软件与更新 选择其他站点 选择最佳服务器 然后点击关 ...

  7. 执行git log/status等命令时,重新打开了个窗口,必须按q才能退出

    终端运行: git config --global core.pager ''

  8. 执行sudo命令时command not found的解决办法

    问题的原因: 在编译sudo包的时候默认开启了- -with-secure-path选项. 方法1: sudo vim /etc/sudoers,并在文件内增加这么一行:Defaults secure ...

  9. Linux软件安装管理之——dpkg与apt-*详解 apt命令(dpkg和apt代替rpm)

    apt list *python* Nosee123关注赞赏支持   Linux软件安装管理之--dpkg与apt-*详解 [Linux软件安装管理系列]- - 传送门: - -<Linux软件 ...

随机推荐

  1. [原创]java WEB学习笔记11:HttpServlet(HttpServletRequest HttpServletRsponse) 以及关于 Servlet 小结

    本博客为原创:综合 尚硅谷(http://www.atguigu.com)的系统教程(深表感谢)和 网络上的现有资源(博客,文档,图书等),资源的出处我会标明 本博客的目的:①总结自己的学习过程,相当 ...

  2. 在Delphi中使用ShellExecute(handle, 'open', PChar(fname),nil, nil, SW_HIDE)函数应注意的问题

    在Delphi中使用ShellExecute(handle, 'open', PChar(fname),nil, nil, SW_HIDE)函数应注意的问题: 一.对一般vcl程序及isapi dll ...

  3. C语言中的位操作(15)--确定log10(N)的整数部分

    本篇文章介绍一个整数的以10为底的对数的整数部分,即对于整数N,求log10(N)整数部分 方法一 : unsigned int v; //32位非0整数 int r; // r保存结果 int t; ...

  4. jsp的9个内置对象

    Jsp提供了request.response.session.application.out.page.config.exception.pageContext9个内置对象. 1. Request R ...

  5. python Tkinter之Button

    Button小部件是一个标准的Tkinter的部件,用于实现各种按钮.按钮可以包含文本或图像,您可以调用Python函数或方法用于每个按钮. Tkinter的按钮被按下时,会自动调用该函数或方法. 该 ...

  6. cookie对比localStorage哪个适合作为网站皮肤存储

    cookie对比localStorage哪个适合作为网站皮肤存储 cookie cookie : 一般由服务器生成,可设置失效时间.如果在浏览器生成,默认是关闭浏览器之后失效 存储大小:4k 每次都会 ...

  7. BZOJ 3296 [USACO2011 Open] Learning Languages:并查集

    题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=3296 题意: 农夫约翰的N(2 <= N <= 10,000)头奶牛,编号为1 ...

  8. 十大最流行PHP框架排名

    PHP 是一个被广泛使用的来进行Web开发的脚本语言.虽然有很多其它可供选择的Web开发语言,像:ASP 和Ruby,但是PHP是目前为止世界上最为流行的. 那么,是什么让PHP如此流行?PHP 如此 ...

  9. 并发问题引出ThreadLocal

    ThreadLocal Thread-->人类Runnable-->任务类 多线程并发问题引出ThreadLocal 多线程并发问题的原因: 操作同一个对象,对对象具有读写权限(只读如拍照 ...

  10. CodeForces - 1019D(BZOJ3707圈地):Large Triangle (几何,找面积为S的三角形)

    题意:给定平面上N个点,问是否存在三角形,其面积为S. 思路:选择Y轴,枚举这个Y轴,面积大小只与|y-Y|有关,然后二分,具体的可以先去做BZOJ3707. 具体的: 1,先对点排序,X坐标为第一关 ...