WSL: sudo apt-get update not work

cheshkin@DESKTOP-ICS68DB:~$ sudo apt-get update [sudo] password for cheshkin: Get:1 http://security.ubuntu.com trusty-security InRelease [65.9 kB] Get:2 http://security.ubuntu.com trusty-security/main amd64 Packages [517 kB] Get:3 http://security.ubuntu.com trusty-security/restricted amd64 Packages [13.0 kB] Get:4 http://security.ubuntu.com trusty-security/universe amd64 Packages [133 kB] Get:5 http://security.ubuntu.com trusty-security/multiverse amd64 Packages [4,990 B] Get:6 http://security.ubuntu.com trusty-security/main Translation-en [284 kB] Get:7 http://security.ubuntu.com trusty-security/multiverse Translation-en [2,570 B] Get:8 http://security.ubuntu.com trusty-security/restricted Translation-en [3,206 B] Get:9 http://security.ubuntu.com trusty-security/universe Translation-en [78.7 kB] Ign http://archive.ubuntu.com trusty InRelease Ign http://archive.ubuntu.com trusty-updates InRelease Err http://archive.ubuntu.com trusty Release.gpg Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1560:8001::14). - connect (113: No route to host) [IP: 2001:67c:1560:8001::14 80] 100% [Connecting to archive.ubuntu.com (91.189.88.152)]

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 20 (2 by maintainers)

Most upvoted comments

For completeness, if the AV is confirmed to not be the cause, one might want to confirm that the firewall in use in Windows allows the WSL environment to communicate outbound on the network. It is a bit different from other Windows apps, so there’s a chance it could be blocked. But the AV itself could be interfering so who knows.

To do a lot of normal network tests one might have to either elevate Bash.exe or use sudo within Bash.exe; but normal activity doesn’t need that. For example, ping or traceroute might not work without elevation (until they get fixed), but dig or wget or apt-get should work without elevation as long as Windows programs (in general) are allowed to work that way.

@Cheshkin , If you are using AVAST or similar antivirus, try turning off the Firewall of it. I faced similar issues with apt-get update. Thanks.

If you’re having trouble due to your firewall, I’d suggest following issue #475 . Basically, at this point, your firewall vendor (Symantec in your case) has to release an update to support WSL.

@Cheshkin , Good Job.

I tried to add an exception to Bash.exe in AVAST. But while browsing to Windows/System32, (through AVAST) I wasn’t able to find Bash.exe listed in it. Bash.exe can be found by browsing through the normal File Explorer, not through AVAST.

In AVAST, firewall exclusions can be given by adding new application rule:

Tools -> Firewall -> Application Rules (bottom)

As I mentioned, I was unable to find Bash.exe and thus adding an exclusion didn’t work out.

I found this while searching for Symantec firewall exception. Please check it out.

Thanks, Arun

@Cheshkin , also, please try running Bash as Administrator.

right click -> More -> Run as administrator.

@Cheshkin - Excellent.

It is another workaround. Something to let us get work done.

You might want to be helpful to others by listing the specific firewall/AV you had to turn off, so if they search here they can find a reference. If you have time, it might be helpful as well to see if you can isolate it to one or the other, if it is not both. But just leaving keywords here can be helpful. Maybe even change the title, since the issue seems to be about WSL networking being incompatible with something (AV/firewall), not apt-get failing.

@Cheshkin , I thought the same with AVAST. What antivirus are you using? I can try installing it just to verify if you like.

Thanks @Cheshkin for posting! Do other network commands also fail for you, or just apt-get?