Ubuntu 16.04:Temporary failure resolving 'security.ubuntu.com'

今天早上对软件源进行更新的时候,发现出现了如下的错误:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

我的解决方法为:

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
sudo apt-get update

然后就一切正常了,我的输出为:

idc@idc-Precision-Tower-7910:~/Downloads/DeepMIML$ sudo apt-get update
Hit:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease                     
Hit:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease             
Hit:3 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease           
Hit:4 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease    
Hit:5 http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu xenial InRelease         
Ign:6 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:7 http://dl.google.com/linux/chrome/deb stable Release                     
Get:9 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]     
Ign:10 http://linux.teamviewer.com/deb stable InRelease                        
Ign:11 http://linux.teamviewer.com/deb preview InRelease                       
Hit:12 http://linux.teamviewer.com/deb stable Release    
Get:9 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:14 http://linux.teamviewer.com/deb preview Release   
Get:16 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [62.3 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [62.1 kB]
Get:18 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [51.3 kB]
Get:19 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [80.2 kB]
Fetched 303 kB in 2min 58s (1,703 B/s)                                         
Reading package lists... Done

参考文献

[1].apt-get update fails to fetch files, “Temporary failure resolving …” error.https://askubuntu.com/questions/91543/apt-get-update-fails-to-fetch-files-temporary-failure-resolving-error

你可能感兴趣的:(linux学习)