码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu apt-get update失败

时间:2015-10-08 23:23:13      阅读:307      评论:0      收藏:0      [点我收藏+]

标签:

当运行apt-get update后出现如下错误时:
E: Some index files failed to download, they have been ignored, or old ones used instead.


解决方案:

1. sudo nano /etc/resolv.conf

2. 在其中加入:

    nameserver=8.8.8.8

3. 重启网络:sudo /etc/init.d/networking restart

重新执行 apt-get update成功!!

有可能还需要执行:

sudo rm -r /var/lib/apt/lists/

Ubuntu apt-get update失败

标签:

原文地址:http://my.oschina.net/RagingTyphoon/blog/514457

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!