当运行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/