Skip to content

Instantly share code, notes, and snippets.

@zhangzhiqiangcs
Created October 19, 2018 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhangzhiqiangcs/9576c7c712526f6dfb4d5a50994adb2b to your computer and use it in GitHub Desktop.
Save zhangzhiqiangcs/9576c7c712526f6dfb4d5a50994adb2b to your computer and use it in GitHub Desktop.
apt-get update fails to fetch files, “Temporary failure resolving …” error
First, temporarily add a known DNS server to your system.
echo "nameserver 8.8.8.8" | tee /etc/resolv.conf > /dev/null
Then run sudo apt-get update.
If this fixes your temporary resolving messages then either wait for 24 hours to see if your ISP fixes the issue for you
(or just contact your ISP) - or you can permanently add a DNS server to your system:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null
8.8.8.8 is Google's own DNS server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment