ubuntu 更新源 或者 apt-get install 出错404 not found ,Failed to fetch
1.考虑是不是能上网
2.用apt-get update ,然后再试试apt-get install
如果apt-get update 也出现很多 404 not found 或者 failed to fetch ,就要考虑更换自己的源,百度搜 /etc/apt/sources.list
3.如果还不行,估计是Ubuntu版本太老了,没有维护的了。
比如我用11.04,sudo apt-get install open-vm-dkms 不行,sudo apt-get update 不行,就死活不行,猜测是版本太老了。?。
也可以参考该文
http://www.tuicool.com/articles/EjMJNz
转载如下:
关于ubuntu的sources.list总结
一、作用
文件/etc/apt/sources.list是一个普通可编辑的文本文件,保存了ubuntu软件更新的源服务器的地址。和sources.list功能一样的是/etc/apt/sources.list.d/*.list(*代表一个文件名,只能由字母、数字、下划线、英文句号组成)。sources.list.d目录下的*.list文件为在单独文件中写入源的地址提供了一种方式,通常用来安装第三方的软件。
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
如上是ubuntu官方sources.list文件内容,具体地含义如下:
每一行的开头是deb或者deb-src,分别表示直接通过.deb文件进行安装和通过源文件的方式进行安装。
deb或者deb-src字段之后,是一段URL,之后是五个用空格隔开的字符串,分别对应相应的目录结构。在浏览器中输入http://archive.ubuntu.com/ubuntu/,并进入dists目录,可以发现有5个目录和前述sources.list文件中的第三列字段相对应。任选其中一个目录进入,可以看到和sources.list后四列相对应的目录结构。
更多内容可以使用man source.list获得。


二、源的选择
ubuntu官方有自身的软件源,直接从官方的软件源获取数据的速度比较慢。而通过国内的一些的源的镜像进行更新一般能够获得比官方源更快的速度,不过不同国内的源的下载速度也会不一样。 这里 给出了较为详细的ubuntu软件源列表,个人现在觉得选取ubuntu软件源的方法是首先选择位于相同地区的源,然后进行ping操作,时延不是太高即可。对比aliyun、sohu、ubuntu官方ping的数据,可以发现aliyun的源在时延上表现最好。



三、使用sudo apt-get install出现404 not found问题的原因和解决
最近在12.10上使用sudo apt-get install命令时,出现了404 not found的问题,此时ping archive.ubuntu.com可以ping通,在http://archive.ubuntu.com/ubuntu/dists/ 目录下已经没有quantal相关目录。具体原因是ubuntu对12.10的维护时间不超过一年,超过了相应的时间之后,对应的源的文件都转移到了http://old-releases.ubuntu.com/ubuntu/dists/ 目录下。ubuntu发布的版本可以从 这里 看到,从中一方面可以看到ubuntu数字版本号和英文名称的对应关系,也可以看到以04结尾的版本LTS标识,标识长期维护,这些版本的源在archive.ubuntu.com中呆的时间就比较长。
解决方法:
1)使用gedit将sources.list文件打开
sudo gedit /etc/apt/sources.list
2)进入替换界面(Search->Replace或者ctrl+H)进行替换操作
四、直接安装deb文件的方法
1)下载一个deb格式的软件kismet
curl https://www.kismetwireless.net/code/dists/quantal/kismet/binary-i386/kismet-2011.03.2.i386.deb >kismet-2011.03.2.i386.deb
2)安装kismet
dpkg -i kismet-2011.03.2.i386.deb
3)根据提示安装相关包
sudo apt-get install libnl2
五、参考材料
[1] repository - How do you tell apt to use files in /etc/apt/sources.list.d - Ask Ubuntu
[2] 源列表 - Ubuntu中文
[5] How do I install a .deb file via the command line askubuntu
ubuntu 更新源 或者 apt-get install 出错404 not found ,Failed to fetch的更多相关文章
- ubuntu更新源(Package has no installation candidate 的问题)
最近将公司的台式机安装了ubuntu16.04,安装之后,使用apt-get install openssh-server 发现出现:Package 'openssh-server' has no i ...
- ubuntu更新源列表
1. 备份源列表 sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup 2.修改更新源 打开源列表 sudo gedit /etc/ap ...
- Ubuntu 更新源
1.首先备份Ubuntu12.04源列表 sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份下当前的源列表) 2.修改更新源 ...
- [转载] 老版本ubuntu 更新源
untu的普通版本支持的时间都有限,过了支持的时间,更新源都会被停用,比如ubuntu9.10原来的源都失效了(包括官方源,类似ustc的第 三方源,因为这些第三方源也是和官方源同步的).因此,直接用 ...
- Ubuntu更新源问题终于解决了
原文地址:http://chenrongya.blog.163.com/blog/static/8747419620143185103297/ 不同的网络状况连接以下源的速度不同, 建议在添加前手动验 ...
- Ubuntu 更新源 内核升级
cat /etc/apt/sources.listdeb http://mirrors.sohu.com/ubuntu/ precise main restricted universe multiv ...
- ubuntu更新源
源一定要找对应的版本 14.04对应 trusty deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multive ...
- ubuntu更新源,简单两步搞定
1.启动器中打开Ubuntu软件中心 2.鼠标顶部面板点击编辑选择软件源(163.sohu) 搞定!
- Ubuntu 更新源失败[GPG error]
对于错误 GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verif ...
随机推荐
- foreach —(遍历数组或循环中的字符,以获取信息)
namespace ConsoleApplication2{ class Program {//letter 字母 gigit 数字 symbol 符号 static void Main(string ...
- 留学Essay写作做到精准表达很关键
很多留学生在essay写作中可以迅速想到合理的中文论点.可是,写出来的英文论点却漏洞百出,不忍直视.在essay写作中我们要如何精准地用英文写出自己内心的独白呢?除了咨询老师,靠自己一样能做到! 1引 ...
- Android群英传知识点回顾——第十章:Android性能优化
10.1 布局优化 10.1.1 Android UI渲染机制 10.1.2 避免Overdraw 10.1.3 优化布局层级 10.1.4 避免嵌套过多无用布局 10.1.5 Hierarchy V ...
- C#窗体与SQL数据库的连接
/*通过C#winform程序访问数据库数据 用到的命名空间和变量类型: using System.Data.SqlClient; SqlConnection:数据库连接类 SqlCommand:数据 ...
- Python调用c++可执行程序
1.c++编译程序 #include <iostream> using namespace std; int test() { , b = ; return a+b; } int main ...
- 2020/1/30 PHP代码审计之文件上传漏洞
0x00 漏洞简介 文件上传漏洞是指用户上传了一个可执行的脚本文件,并通过此脚本文件获得了执行服务器端命令的能力.这种攻击是最为直接和有效的,"文件上传"本身是没有问题,有问题的是 ...
- js动态删除行错误
Uncaught TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'. js ...
- POJ 1942:Paths on a Grid
Paths on a Grid Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 22918 Accepted: 5651 ...
- Ubuntu16.04安装配置Caffe教程(GPU版)
推荐博客:https://www.linuxidc.com/Linux/2017-11/148629.htmhttps://blog.csdn.net/yggaoeecs/article/detail ...
- Python笔记_第五篇_Python数据分析基础教程_NumPy基础
1. NumPy的基础使用涵盖如下内容: 数据类型 数组类型 类型转换 创建数组 数组索引 数组切片 改变维度 2. NumPy数组对象: NumPy中的ndarray是一个多维数组对象,该兑现共有两 ...