我输入 sudo apt-get update 出现错误:

/etc/apt$ sudo apt-get update
Err http://security.ubuntu.com precise-security InRelease Err http://security.ubuntu.com precise-security Release.gpg
Temporary failure resolving 'security.ubuntu.com'
Err http://cn.archive.ubuntu.com precise InRelease Err http://cn.archive.ubuntu.com precise-updates InRelease Err http://cn.archive.ubuntu.com precise-backports InRelease Err http://cn.archive.ubuntu.com precise Release.gpg
Temporary failure resolving 'cn.archive.ubuntu.com'
Err http://cn.archive.ubuntu.com precise-updates Release.gpg
Temporary failure resolving 'cn.archive.ubuntu.com'
Err http://cn.archive.ubuntu.com precise-backports Release.gpg
Temporary failure resolving 'cn.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise/InRelease W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise-backports/InRelease W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/InRelease W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg Temporary failure resolving 'security.ubuntu.com' W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg Temporary failure resolving 'cn.archive.ubuntu.com' W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg Temporary failure resolving 'cn.archive.ubuntu.com' W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg Temporary failure resolving 'cn.archive.ubuntu.com' W: Some index files failed to download. They have been ignored, or old ones used instead.
xinju@xinjuOffice:/etc/apt$ cd ../network

(错误当时没有记录下来上网找到了同样错误的提示!)

——-下面我们就一起讨论下这个情况!

所有停止维护的版本都可以使用old源。所以在元列表中把原来的地址改为带有old源的就可以了。

首先,备份系统中的源列表,打开终端,输入
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

4.输入
sudo gedit /etc/apt/sources.list
打开源列表文件,ctrl+A,然后delete,删除全部内容
然后把下面的地址复制到该文件中:

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

5.需要注意的是上面地址中的 utopic是ubuntu系统版本的名称,我的ubuntu系统是14.10,对应的版本名称是utopic。只要把这里的utopic换车你自己系统版本的名称即可,如果不知道版本名称的话,可以运行以下命令获得
lsb_release -a
其中,Codename就是了。

6.保存好源列表文件后,进入到终端,一定要再输入以下命令
sudo apt-get update
来进行更新,会看到没有失败的提示了,转而出现“命中,获取中”等字眼。

本文为转载,出处为图片 上的网址。

Ubuntu中无法update的解决办法的更多相关文章

  1. Ubuntu系统 apt-get update失败解决办法

    使用apt-get的时候发现ubuntu和阿里云均已经不提供该版本的源,所以需要找到其他的替代源. 使用的ubuntu版本是14.10,属于非LTS(长期支持版本),因此前一段时间还可以使用apt-g ...

  2. 在win7系统下安装把Ubuntu17.04安装在另一个硬盘开机无法进入Ubuntu问题的一种解决办法。【转】

    本文转载自:http://blog.csdn.net/u012879090/article/details/74937762 在win7系统下安装把Ubuntu17.04安装在另一个硬盘开机无法进入U ...

  3. Oracle中的 UPDATE FROM 解决方法

    转:http://www.cnblogs.com/JasonLiao/archive/2009/12/23/1630895.html Oracle中的 UPDATE FROM 解决方法 在表的更新操作 ...

  4. vsftp在REDHAT,CENTOS 5中登录慢的解决办法

    vsftp在REDHAT,CENTOS 5中登录慢的解决办法 vsftp在REDHAT,CENTOS 5中不仅登录慢,至少花30秒左右,而且上传文件的速度也受影响, 经过摸索,根本原因在DNS解析上花 ...

  5. linux中tomcat内存溢出解决办法

    用命令 tail -f /root/apache-tomcat-6.0.20/logs/catalina.out(需要找到tomcat路径) 查看日志,查看是否有错误 linux中tomcat内存溢出 ...

  6. ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务解决办法

    ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务解决办法: 1.首先打开cmd命令 查看本地TNSPING配置 是否ok?然后找到 Oracle 安装文件 中 listener. ...

  7. .net core, docker 在vs2019开发过程中的问题以及解决办法

    .net core, docker 在vs2019开发过程中的问题以及解决办法 记录下来,帮助Ta人~ 1.vs调试,快Build完后提示Docker 端口:xxxx,xxxx,xxxx占用 解决办法 ...

  8. ubuntu下安装ESP8266开发环境步骤中可能出现的问题及解决办法

    安装步骤参考如下链接 https://www.jianshu.com/p/e9ce2a60df83 1.在GitHub上拉取代码时发生错误:RPC failed; curl 18 transfer c ...

  9. ubuntu sudo apt-get update 失败 解决方法

    sudo apt-get update 报了一堆错误: Err http://cn.archive.ubuntu.com trusty InRelease Err http://cn.archive. ...

随机推荐

  1. android蓝牙协议名词解释 OPP HFP HDP A2DP PAN

    各种蓝牙协议的全称: OPP:对象存储规范(Object Push Profile),最为常见的,文件的传输都是使用此协议. HFP:(Hands-free Profile),让蓝牙设备能够控制电话, ...

  2. logo切图大小相应的尺寸

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMTQwNDYxMQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQk ...

  3. 【编码格式错误】SyntaxError: Non-UTF-8 code starting with

    问题: SyntaxError: Non-UTF-8 code starting with '\xba' in file E:/placement/placement/Placement Test/c ...

  4. DataGridView导出数据到Excel及单元格格式的改动

    在软件开发过程中,时常会遇到把一些数据信息从DataGridView中导出到Excel表格中的情况.假设写的多了就会发现挺简单的,我们最好还是来写一写,留作备用,毕竟有时候Ctrl+C和Ctrl+V还 ...

  5. oc17--点语法

    // // Person.h // day13 #import <Foundation/Foundation.h> @interface Person : NSObject { // @p ...

  6. 杂项-地图:LBS

    ylbtech-杂项-地图:LBS 基于位置的服务,它是通过电信移动运营商的无线电通讯网络(如GSM网.CDMA网)或外部定位方式(如GPS)获取移动终端用户的位置信息(地理坐标,或大地坐标),在地理 ...

  7. ROS单线多拨pppoe

    #设置内网IP地址 / ip add add interface=ether1 address=192.168.0.254/255.255.255.0 #设置共享上网 / ip firewall na ...

  8. typeof、instanceof、hasOwnProperty()、isPrototypeOf()

    typeof 操作符 instanceof 操作符 hasOwnProperty()方法 isPrototypeOf()方法 1.typeof 用于获取变量的类型,一般只返回以下几个值:string, ...

  9. golang图片压缩

    package main import (    //"encoding/json"    "fmt"    //"os"    //&qu ...

  10. powershell遍历文件夹设置权限,解决文件无法删除的问题。

    function set-rights ($path) { $p = Get-Item $path; if ($p.Attributes -eq 'Directory') { foreach ($ch ...