The solution for apt-get update Err 404

最近在ubuntu 12.10上执行sudo apt-get update 命令后出现了如下错误:

    Ign http://extras.ubuntu.com natty/main TranslationIndex
    Err http://extras.ubuntu.com natty/main Sources
      404  Not Found
    Err http://extras.ubuntu.com natty/main i386 Packages
      404  Not Found
    Ign http://extras.ubuntu.com natty/main Translation-en_US
    Err http://security.ubuntu.com natty-security/universe Sources
      404  Not Found [IP: 91.189.92.200 80]
    Err http://security.ubuntu.com natty-security/multiverse Sources
      404  Not Found [IP: 91.189.92.200 80]
    Ign http://extras.ubuntu.com natty/main Translation-en
    Err http://security.ubuntu.com natty-security/universe i386 Packages
      404  Not Found [IP: 91.189.92.200 80]
    Err http://security.ubuntu.com natty-security/multiverse i386 Packages
      404  Not Found [IP: 91.189.92.200 80]
    Err http://security.ubuntu.com natty-security/main Sources
      404  Not Found [IP: 91.189.92.200 80]
    Err http://security.ubuntu.com natty-security/restricted Sources
      404  Not Found [IP: 91.189.92.200 80]
    Err http://security.ubuntu.com natty-security/main i386 Packages
      404  Not Found [IP: 91.189.92.200 80]
    Err http://security.ubuntu.com natty-security/restricted i386 Packages
      404  Not Found [IP: 91.189.92.200 80]
    Ign http://security.ubuntu.com natty-security/main Translation-en_US
    Ign http://security.ubuntu.com natty-security/main Translation-en
    Ign http://security.ubuntu.com natty-security/multiverse Translation-en_US
    Ign http://security.ubuntu.com natty-security/multiverse Translation-en
    Ign http://security.ubuntu.com natty-security/restricted Translation-en_US
    Ign http://security.ubuntu.com natty-security/restricted Translation-en
    Ign http://security.ubuntu.com natty-security/universe Translation-en_US
    Ign http://security.ubuntu.com natty-security/universe Translation-en
    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty/main/source/Sources  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty/restricted/source/Sources  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty/universe/source/Sources  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty/multiverse/source/Sources  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty/main/binary-i386/Packages  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty/restricted/binary-i386/Packages  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty/universe/binary-i386/Packages  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty/multiverse/binary-i386/Packages  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty-updates/main/source/Sources  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty-updates/restricted/source/Sources  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty-updates/universe/source/Sources  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty-updates/multiverse/source/Sources  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty-updates/main/binary-i386/Packages  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty-updates/restricted/binary-i386/Packages  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty-updates/universe/binary-i386/Packages  404  Not Found  

    W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/natty-updates/multiverse/binary-i386/Packages  404  Not Found  

    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/universe/source/Sources  404  Not Found [IP: 91.189.92.200 80]  

    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/multiverse/source/Sources  404  Not Found [IP: 91.189.92.200 80]  

    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/universe/binary-i386/Packages  404  Not Found [IP: 91.189.92.200 80]  

    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.92.200 80]  

    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/main/source/Sources  404  Not Found [IP: 91.189.92.200 80]  

    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/restricted/source/Sources  404  Not Found [IP: 91.189.92.200 80]  

    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/main/binary-i386/Packages  404  Not Found [IP: 91.189.92.200 80]  

    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.92.200 80]  

    W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/main/source/Sources  404  Not Found  

    W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/main/binary-i386/Packages  404  Not Found  

    E: Some index files failed to download. They have been ignored, or old ones used instead.
    [email protected]:~$ sudo apt-get install git
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package git  

发现很多源找不到,需要重新寻找更新源,最后把/etc/apt/sources.list文件中的内容直接替换成:

deb http://mirrors.163.com/ubuntu/ lucid main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ lucid-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ lucid main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ lucid-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ lucid-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ lucid-backports main restricted universe multiverse

发现了这个源超级快的,是网易163更新服务器,亲测可用

另外附上
搜狐更新服务器:

deb http://mirrors.sohu.com/ubuntu/ lucid main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ lucid-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ lucid main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ lucid-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ lucid-backports main restricted universe multiverse 

这个速度也非常快,国内的源就是牛x啊~~

时间: 2024-10-12 08:29:18

The solution for apt-get update Err 404的相关文章

sudo apt get update时的问题

原文地址:https://www.cnblogs.com/zxzmnh/p/11823022.html

Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.

报错命令 [email protected]:/etc/apt# apt-get update Err:1 http://mirrors.aliyun.com/ubuntu trusty InRelease Could not resolve 'mirrors.aliyun.com' Err:2 http://mirrors.aliyun.com/ubuntu trusty-backports InRelease Could not resolve 'mirrors.aliyun.com' Er

Debian 采用 iso 镜像作为 apt 源

1.将N个debian-506-amd64-DVD-N.iso存放于本地或其他媒介内,本例是放在本机/iso/目录下2.创建N个挂载点目录 如下: debian:~#mkdir –r /media/dvd1 debian:~#mkdir –r /media/dvd2 debian:~#mkdir –r /media/dvd3 -. debian:~#mkdir –r /media/dvdN 3.挂载iso文件 debian:~#cd /iso debian:/iso#mount –o loop

Kali Centos8 黑科技,一篇搞懂apt与dpkg软件管理命令工具

感谢分享原文-http://bjbsair.com/2020-04-03/tech-info/29920.html ============================================== Kali Linux中主要有apt-get和dpkg两个软件管理工具,前者用的最多,apt是apt-get的升级版 ,建议用apt命令. dpkg是一个Debian的一个命令行工具,它可以用来安装.删除.构建和管理Debian的软件包.那它们两者怎么使用?你能发现他们的区别吗? 一.apt

Ubuntu11.10 E: Unable to locate package ubuntu-restricted-extras

最近在ubuntu11.10下安装支持多媒体播放的插件时遇到一些问题,在此小记一下. 首先是ubuntu11.10的安装,基本上是一键安装,在此不细说. 1.此版本和以前使用的ubuntu版本风格不太一致,为此在使用时一度不太习惯. 1)软件源服务器的选择 在左侧列表中有一个System  Settings,点击进入有3大选项,选择System里面的Software Sources,出现一个对话框,第一项为Ubuntu Software,此项里有一个DownLoad From选择中国服务器mir

[转]Ubuntu Precise - Install youtube-dl package using Quantal repo

Ubuntu Precise - Install youtube-dl package using Quantal repo Ubuntu Precise 12.04 currently contains in repository youtube-dl version 2012.02.27-1. As of recent YouTube changes this package version is not usable anymore but there is an updated vers

Nodejs基于Express4的动态页面静态化

上个星期在慕课网上提了个问:Express4开发的动态页面访问好慢的说?不幸的是并没有得到可行的回答,周末自己折腾了一番,一并将小站(花满楼)的几个页面全部静态化了:事后想了想,虽不是什么特别标准好的搞法,但纠结这么久了,这个问题终于有办法了,还是有些欣慰的: 一开始页面都是动态的,由jade模板render出来的,可不明白为什么不论页面内容多少,打开都至少要一秒多...:后来专门弄个站点作为静态资源站,缓存加gzip(Nodejs打造静态资源服务器与文件上传):OK,静态资源现在没啥大问题了:

Python中使用Flask、MongoDB搭建简易图片服务器

1.前期准备 通过 pip 或 easy_install 安装了 pymongo 之后, 就能通过 Python 调教 mongodb 了.接着安装个 flask 用来当 web 服务器. 当然 mongo 也是得安装的. 对于 Ubuntu 用户, 特别是使用 Server 12.04 的同学, 安装最新版要略费些周折, 具体说是 ? 1 2 3 4 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB

Nodejs与MySQL交互(felixge/node-mysql)

Nodejs与MySQL交互(felixge/node-mysql) - porschev 原文  http://www.cnblogs.com/zhongweiv/p/nodejs_mysql.html 简介和安装 Node.js与MySQL交互操作有很多库,具体可以在 https://www.npmjs.org/search?q=mysql   查看. 我选择了felixge/node-mysql,用的人比较多,先随大溜看看它的使用, 暂时没有太过纠结于各库之间的执行性能问题 ,对其它库有研