Ubuntu 解决:当执行`sudo apt-get update`命令时 出现的 “apt-get 404 Not Found Package Repository Errors” 问题
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
最新文章
- Beginning Scala study note(8) Scala Type System
- JS中的“!!”
- NSSortDescriptor对象进行数组排序
- MFC CString to char* (Visual Studio 2015 亲测可用)
- Java第一天学习笔记整理
- POJ 2762 tarjan缩点+并查集+度数
- 我的Java后端书架2016年暮春3.0版(转)
- javaSE第五天
- Kinect帮助文档翻译之三 多场景
- 站长、运维必备| 网站可用性监控产品 OneAPM Cloud Test 上线
- bzoj1135
- UIButton return(textField textView)
- 在Angular中,如果权限值是异步请求所得,如何将其设置为HTTP请求头的Authorization?
- Spark处理日志文件常见操作
- JAVA基础第八组(5道题)
- scrapy模拟登录微博
- ES5新增
- My Team——面向对象与软件工程实验三
- Open/Close Port in Centos
- Vue:(二)基础常用语法
热门文章
- swift 全局常量 &;&; 全局变量的写法
- java中接口的概念及使用(补充final修饰符的使用)
- [原创]java WEB学习笔记37:EL表达式(简介,运算符,自动类型转换,保留字,隐含对象)
- Python 3 mysql 库操作
- P4965 薇尔莉特的打字机
- MAC下ssh免密码登录远程服务器
- 算法(Algorithms)第4版 练习 1.4.6
- Outlook 2010打开没反应,只有任务栏有图标的解决方法
- php一维数组的创建
- MATLAB卷积运算(conv、conv2)解释