Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running sudo apt-get update on build 14372 #614

Closed
nlbao opened this issue Jul 1, 2016 · 14 comments
Closed

Error when running sudo apt-get update on build 14372 #614

nlbao opened this issue Jul 1, 2016 · 14 comments

Comments

@nlbao
Copy link

nlbao commented Jul 1, 2016

Hi,
My Windows 10 Pro Insider Preview Build Number: 14372.rs1_release.160620-2342
I ran Bash as an Admin, and running sudo apt-get update returns the following error:

0% [Working]http: ../sysdeps/posix/getaddrinfo.c:2583: getaddrinfo: Assertion `(__extension__ ({ 
const struct in6_addr *__a = (const struct in6_addr *) (sin6->sin6_addr.__in6_u.__u6_addr32); 
__a->__in6_u.__u6_addr32[0] == 0 && __a->__in6_u.__u6_addr32[1] == 0 && 
__a->__in6_u.__u6_addr32[2] == __bswap_32 (0xffff); }))' failed.
E: Method http has died unexpectedly!
E: Sub-process http received signal 6.
@nlbao nlbao changed the title Error when running sudo apt-get update Error when running sudo apt-get update on build 14372 Jul 1, 2016
@Manouchehri
Copy link
Contributor

Can you post an strace? e.g. sudo strace apt-get update

Does curl http://google.com work either?

@nlbao
Copy link
Author

nlbao commented Jul 1, 2016

This is the output of sudo strace apt-get update: log.txt
Yes, 'curl http://google.com' works fine.

@Manouchehri
Copy link
Contributor

The log you posted seems to be successful? I don't see any SIGABRT (signal 6).

write(1, "\rReading package lists... Done\r", 31) = 31

@nlbao
Copy link
Author

nlbao commented Jul 2, 2016

Hi, I found a solution: just running sudo apt-get update a few times, and the error gone, that why the about log is successful.

@nlbao nlbao closed this as completed Jul 2, 2016
@zths
Copy link

zths commented Jul 11, 2016

Go /etc/hosts and Append "127.0.0.1 【Your Computer Name】" to fix this problem.

@benhillis
Copy link
Member

You can also remove /etc/hosts and restart bash.exe to generate a version that contains your hostname.

@Gowee
Copy link

Gowee commented Oct 4, 2016

Update: Apr 4, 2017
I am now still troubled by this problem. I find that it just occasionally works or misbehaves regardless of whether zths's solution is applied or not.


Update: Apr 4, 2017
For some reason, I start to use BoW again while meeting the same problem again. This time zths's solution makes it work well. (


Exactly the same problem on my 14936.rs_prerelease. Existed at least since the last Windows version.
@zths 's solution does not work.

@zwcloud
Copy link

zwcloud commented Nov 6, 2016

There is a warning message when I tried to sudo apt get xxx: sudo: unable to resolve host Computer_Name.
zths 's solution works for me!

@Abdelhamidkassem
Copy link

I'm new user in using linux on windows and trying to type
sudo
but i got error unable to resolve host and i don't know exactly what to do, could you help me?
@zths @benhillis

@benhillis
Copy link
Member

Could you try removing /etc/hosts and relaunching bash?

@Abdelhamidkassem
Copy link

Abdelhamidkassem commented Mar 1, 2017

@benhillis thanks for your reply but I can't remove it !
rm: remove write-protected regular file ‘hosts’? Y rm: cannot remove ‘hosts’: Permission denied

@benhillis
Copy link
Member

benhillis commented Mar 1, 2017

@Abdelhamidkassem - have you tried sudo rm /etc/hosts

@Abdelhamidkassem
Copy link

Yeah it works well now, Thanks 👍
@benhillis

@ac1982
Copy link

ac1982 commented Mar 15, 2017

Same issue on windows 10 v1607, even rebuild hosts by sudo rm /etc/hosts then restart bash.
And no problem with curl --head https://www.google.com, it works and get right response.

Windows: 10 V1607, OS 14393.953
Last Update: 15 Mar, 2017.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants