Repository navigation
Closed
Description
Running apt-get update returns the following:
root@localhost:~# apt-get update
Err http://archive.ubuntu.com trusty InRelease
Err http://archive.ubuntu.com trusty-updates InRelease
Err http://security.ubuntu.com trusty-security InRelease
Err http://archive.ubuntu.com trusty Release.gpg
Could not resolve 'archive.ubuntu.com'
Err http://security.ubuntu.com trusty-security Release.gpg
Could not resolve 'security.ubuntu.com'
Err http://archive.ubuntu.com trusty-updates Release.gpg
Could not resolve 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Could not resolve 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@localhost:~#
Running curl also doesn't seem to work:
root@localhost:~# curl www.microsoft.com
curl: (6) Could not resolve host: www.microsoft.com
I'm running Bash as an Admin.
My Windows 10 Pro Insider Preview Build Number:
Build 14316.rs1_release.160402-2217
Reacted by Adam Bonner, Tom McKearney, Daniel Zuidinga, Chris, André Nanninga, Nicolas Challeil, Sergey Dogotar, Mattias Festin, Joachim Namyslo, Lukas Kalbertodt and 24 more
Reacted by tcatz123
Metadata
Metadata
Assignees
Labels
No labels
Activity
russalex commentedon Apr 7, 2016
Thank you for reporting. This is probably your /etc/resolv.conf file not being generated correctly. Any chance you can take a look at it's contents and compare the DNS servers with ipconfig /all at the cmd prompt?
Also, a couple of questions:
If you're on wifi, can you try and switch to a different network and back? If not, try uninstalling through "lxrun /uninstall" and reinstall in Bash.
Let me know if any of the above work. I will also be writing a bug on our side for this.
robertsmieja commentedon Apr 7, 2016
I'm on a Wired Connection, without VPN. I do have an IPv6 enabled router/modem, and am using NAT.
vi /etc/resolv.confresults in the following:ipconfig /allresults in the following (I snipped a bit, let me know if there's something I left out):Running the following didn't result in any changes:
One more "fun" thing to report, here's the output from
nslookup www.microsoft.com:russalex commentedon Apr 7, 2016
Thanks. Sending this off to the dev team to take a look.
russalex commentedon Apr 7, 2016
Robert Smieja (@robertsmieja). one more question. Any chance you can send me the rest of your ipconfig /all? If you don't want to post feel free to DM it to @richturn_ms. Just tell him it's for me.
robertsmieja commentedon Apr 7, 2016
Here's the rest. I think the only identifiable info in it is my MAC address which I already shared. Whoops.
jokeyrhyme commentedon Apr 7, 2016
Out-of-the-box I had
apt-get updateetc working just fine on my machine. No VPN, no wireless, ethernet hardline, but I do have the Hyper-V and VirtualBox virtual bridging interfaces.robertsmieja commentedon Apr 7, 2016
Well if I had to take a guess, there's an error creating a socket so I have 0 network connectivity. It could be a "driver" issue where the Ubuntu distro doesn't have the driver for my network card, or something to that effect.
What's suspicious is that it's complaining about "invalid argument" for the setsockopt function call in socket.c, where the call "setsockopt(20, SO_TIMEOUT)" appears to be missing one argument, according to documentation: http://man7.org/linux/man-pages/man7/socket.7.html
Here's the
ifconfigandll /proc/net/output, which may be useful:jernejs commentedon Apr 7, 2016
I have the same problem if I leave the ipv6 nameserver first in /etc/resolv.conf. Removing (or moving it to the last line) makes resolving work for me.
jokeyrhyme commentedon Apr 7, 2016
Jernej Simončič (@jernejs) good call. My working scenario is IPv4-only, without any IPv6 internet connectivity.
jacqinthebox commentedon Apr 7, 2016
Same problem here, no internet connectivity.
root@localhost:/# ifconfig Warning: cannot open /proc/net/dev (No such file or directory). Limited output.Here I'm pinging my gateway:
I'm on a wired internet connection and disabled the Hyper-V bridge just in case. No VPN.
Here I'm trying to reset the network:
And for the record, I run Ubuntu as well on this machine (dual boot) and it never has problems recognizing my network interface card.
Any suggestions? I'm so happy with this feature. :)
pallatee commentedon Apr 7, 2016
I have same symptoms as Jacqueline (@jacqinthebox) but I am able to install packages with apt and access internet with links
gdude2002 commentedon Apr 7, 2016
I got networking working on mine by disabling my AV's firewall. That won't fix all networking applications, but it'll get
apt-getworking.jamesscholeyweb commentedon Apr 7, 2016
I can also confirm that disabling firewall in Bitdefender solved this for me. I tried also with allowing bash.exe through but didn't work so i'm assuming some other services need to be allowed through firewall. So for now have it disabled and using windows firewall and everything ok.
gdude2002 commentedon Apr 7, 2016
Images from BfW seem to be completely separate from normal Windows processes. They do exist, and they don't show up in the task manager, but you can see them in the resource monitor.
For example, in the below screenshot, you can see an image named
http, which shows up when I runapt-get update.Even more curious:
thanosk commentedon Apr 7, 2016
I am running Win10 build 14316 inside VMWare on Ubuntu 15.10 host OS. VMWare networking is configured as Bridged for Win10 guest OS. LAN situation on this PC is ethernet-based.
MS Bash did not correctly generate /etc/resolv.conf, it was totally empty. I had to add a simple
nameserver 192.168.1.254(my home router) in order to get it working. I'm also attaching the output fromipconfig /all(with snipped MAC address) if that helps.ipconfig-output.txt
187 remaining items
latinvm commentedon Oct 24, 2017
To prevent /etc/resolv.conf to get overwritten simply do the following:
sudo cp /etc/resolv.conf /etc/resolv.conf.baksudo rm /etc/resolv.confsudo mv /etc/resolv.conf.bak /etc/resolv.confNow all changes made to /etc/resolv.conf wil stay in effect, to get this working I simply added Google's nameservers:
nameserver 8.8.8.8nameserver 8.8.4.4ANiMOSiTYza commentedon Oct 26, 2017
I'm still having this issue.
I've tried everything in this thread and even in other bugs noted on github.
My resolv.conf file is correct, containing only the correct DNS server on my local network.
Anybody have any ideas if its related to the Killer Ethernet driver perhaps?
barrystyle commentedon Oct 26, 2017
ANiMOSiTY (@ANiMOSiTYza): At the bash prompt, enter 'route'.. other than the headings you should have two lines; one being your local route and the other being your default gateway (marked as default). If you're missing the default - the linux subsystem has no way to talk out..
ANiMOSiTYza commentedon Oct 26, 2017
barrystyle (@barrystyle)
Edit...
Routes look normal - default route to my gateway is there, but it takes a good 20 seconds to populate the route table.
barrystyle commentedon Oct 27, 2017
ANiMOSiTY (@ANiMOSiTYza) Earlier post by me, resolved my immediate situation (#5 (comment)). If IPv6 is vital for you, then try these bad boys:
sushantmishra1996 commentedon Jul 16, 2018
FOR PEOPLE WORKING ON A PROXY NETWORK
I had this same issue. I resolved it this way:
sudo nano /etc/apt/apt.conf
Acquire::http::Proxy "http://proxyaddress:port";
press ctrl+X then y then enter to save.
( Example: acquire::http::Proxy "http://192.10.3.40:8080"; )
bingo! it works now.
Mujaddadi commentedon Dec 8, 2018
Fort me it worked after completely disabling Kaspersky free antivirus.
fuhrmanator commentedon May 1, 2019
This happened to me today. It was a particular WiFi that was the problem. My windows 10 had access, but no connectivity (or very restricted) in WSL.
alelasantillan commentedon May 20, 2019
In my case DNS are resolved fine. But
sudo apt update is not working
I can ping local addresses only.
wget not working.
I also have cygwin intalled in the same box and wget works perfect there.
Don’t understand why WSL is not working.
Christopher-Hayes commentedon Aug 7, 2019
In my case, my nameserver configuration kept being reverted on relaunch. I was only replacing the IP address and did not remove or touch the commented text in
/etc/resolv.conf. Apparently, if you edit the first line of commented text (deleting it or even replacing a single character!), then WSL will not overwrite your nameserver configuration. This seems weird, but I tested this a number of times and WSL totally ignoresgenerateResolvConfvalue in the/etc/wsl.conffile. This is an open issue at #701System: WSL2 with OS build 18950.1000
MarioPeters commentedon Aug 16, 2019
in Powershell:
The first entry let my inet connection work.
dezza commentedon Jan 2, 2020
This happened suddenly, I just removed
/etc/resolv.confrebooted and let it regenerate the file, this makes sure you are not hardcoding your DNS server for easing further troubleshooting and keeping installation as close to defaults as possible. Most people want the DNS to follow in WSL if you decide to tether internet via phone, use VPN provider etc.ArnieBerg commentedon Feb 9, 2020
I resolved this by shutting down my VPN.
rooom13 commentedon Mar 13, 2020
This worked for me on March 2020