Saturday, April 16, 2016

When Bash on Ubuntu on Windows can't update because it "could not resolve" an Ubuntu server

An issue people are running into with Windows 10's new support for Ubuntu's Bash shell is that it sometimes has no Internet connectivity and therefore cannot update. Specifically, this text appears as part of the output of sudo apt-get update:

Could not resolve 'archive.ubuntu.com'

There are two likely causes mentioned in the discussion surrounding the issue on GitHub:

  1. /etc/resolv.conf didn't get generated correctly. Add a nameserver line with the address of a valid DNS server. That seems to work best when the DNS server is on the local network, i.e. is the router. For example, nameserver 8.8.8.8 sets Google DNS as a DNS resolver.
  2. An antivirus application is interfering with Bash's network connections. Try disabling the firewall.

No comments:

Post a Comment