WSL icon indicating copy to clipboard operation
WSL copied to clipboard

AptPackageIndexUpdate fails and can not apt-get update manually

Open sherkwast opened this issue 10 years ago • 6 comments

  • A brief description AptPackageIndexUpdate opened and failed(err http ) and I went into bash to apt-get update manually it also failed.
  • Expected results Inform me when to update and update successfully.
  • Actual results (with terminal output if applicable)

/mnt/c/Windows/System32$ apt-get update E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

  • Your Windows build number 10.0.14393

sherkwast avatar Nov 27 '16 19:11 sherkwast

Looks like you are not running the command with sudo. Apt-get update requires root (it says so in the error message above).

benhillis avatar Nov 27 '16 19:11 benhillis

Please reopen if "sudo apt-get update" does not work for you.

benhillis avatar Nov 29 '16 16:11 benhillis

When running sudo apt-get update, I'm getting the following errors:

.
.
.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/restricted/binary-amd64/Packages  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::21). - connect (13: Permission denied) [IP: 2001:67c:1360:8001::21 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/universe/binary-amd64/Packages  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::21). - connect (13: Permission denied) [IP: 2001:67c:1360:8001::21 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/multiverse/binary-amd64/Packages  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::21). - connect (13: Permission denied) [IP: 2001:67c:1360:8001::21 80]

These are just the last 3. I am able to ssh to other servers and I can also ping www.google.com for example. But every time I try to install something with apt-get or update, I get the error:

connect (13: Permission denied) [IP: 2001:67c:1360:8001::21 80]

Let me know if you need any more info.

sam-castaneda avatar Feb 23 '17 15:02 sam-castaneda

Maybe it's better if I open a new issue? Or can we re-open this one?

sam-castaneda avatar Feb 23 '17 15:02 sam-castaneda

Opened issue #1720

sam-castaneda avatar Feb 23 '17 15:02 sam-castaneda

Hey @sam-castaneda -- thanks! FYI, if you prefix an issue number with '#' (for example, #1720 ), it automatically links to the issue so future readers can jump right to the new issue.

aseering avatar Feb 23 '17 18:02 aseering