sudo apt-get update或 sudo apt-get install时出现“404 NOT FOUND [IP:91.189.91.38 80]” 错误的解决方案

在VMware虚拟机安装插件时,使用sudo apt-get update命令出现以下提示。

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

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/main/source/Sources  404  Not Found [IP: 91.189.91.38 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/source/Sources  404  Not Found [IP: 91.189.91.38 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages  404  Not Found [IP: 91.189.91.38 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.91.38 80]

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

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

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

在网上查了资料发现是软件源找不到,继续查资料发现 ubuntu10.x系列早已停止了更新支持,ubuntu也不再维护了。试了一下其他第三方源包括163,sohu等也不行。后面找解决办法时在一个博主那里找到了解决方法:为了解决这个问题,ubuntu提供了old-release的方案,通过命令行更新源如下:
    cd  /etc/apt/ ,目录下找到sources.list,打开源列表文件,把里面的地址全部注销(如果不放心,在修改源列表文件之前可以先将文件备份一下),然后换上如下的地址。

deb http://old-releases.ubuntu.com/ubuntu maverick main restricted universe multiverse   
deb http://old-releases.ubuntu.com/ubuntu maverick-security main restricted universe multiverse   
deb http://old-releases.ubuntu.com/ubuntu maverick-updates main restricted universe multiverse   
deb http://old-releases.ubuntu.com/ubuntu maverick-proposed main restricted universe multiverse   
deb http://old-releases.ubuntu.com/ubuntu maverick-backports main restricted universe multiverse   
deb-src http://old-releases.ubuntu.com/ubuntu maverick main restricted universe multiverse   
deb-src http://old-releases.ubuntu.com/ubuntu maverick-security main restricted universe multiverse   
deb-src http://old-releases.ubuntu.com/ubuntu maverick-updates main restricted universe multiverse   
deb-src http://old-releases.ubuntu.com/ubuntu maverick-proposed main restricted universe multiverse   

deb-src http://old-releases.ubuntu.com/ubuntu maverick-backports main restricted universe multiverse

在这里注意:首先明确自己的系统版本  linux下敲入如下命令:sudo lsb_release -a

  Codename表示这一版本的名字,每一个发行版本都有一个特定的名称。 (如果是其他版本的,把maverick替换即可。)

例如我的版本是:Ubuntu 12.04.2 LTS  ,Codename:    precise。上面的文件就把maverick(颜色标记)替换precise。

修改sources.list文件时由于是系统文件需要先修改权限为其他人可写,我是通过Vim编辑器修改内容的,试过gedit编辑器发现不能保存。

最后在终端输入指令:sudo apt-get update     运行 正常。

 参考资料:sudo apt-get install 安装软件总是出现“404 NOT FOUND” 错误的解决方案 !_phymat.nico的专栏-CSDN博客


版权声明:本文为weixin_44863237原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。