WSL: Assertion `IN6_IS_ADDR_V4MAPPED (sin6->sin6_addr.s6_addr32)' failed

I use some command get a problem http: ../sysdeps/posix/getaddrinfo.c:2603: getaddrinfo: Assertion `IN6_IS_ADDR_V4MAPPED (sin6->sin6_addr.s6_addr32)' failed.

in some command as apt or pip, replace command the error miss

i tired search similar issue and reinstall windows and wsl, don’t fix this problem

My Windows version: Microsoft Windows [版本 10.0.15063]

i’m sorry about my pool English 😭

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 6
  • Comments: 29

Most upvoted comments

You just need to close ipv6 in windows10

i try disable windows ipv6. but i don’t know how to disable lo ipv6

@kdwycz - I could not sure this is a solution but… http://www.techunboxed.com/2014/10/how-to-disable-ipv6-in-windows-10.html describes how to disable ipv6 in windows 10.

UPDATE: I found an article Disable IPv6 on Ubuntu Linux and Windows 10.

QUOTE: To disable IPv6 only for apt-get:

sudoedit /etc/apt/apt.conf.d/99force-ipv4

Put the following contents in it:

Acquire::ForceIPv4 “true”;

I find the following solution is effective. I add the following line to the /etc/ssh/sshd_config to force sshd to listen on the ipv4 address.

ListenAddress 0.0.0.0

then restart the sshd service sudo service ssh restart

@ycecube Thank you for providing the idea, not applicable for me. But help me find the final answer

Finally, I found a huorong antivirus software, After the uninstall the computer repair

---------------Update-------------- I am giving feedback on this issue in a Chinese forum

You just need to close ipv6 in windows10

i found where the problem is. it was caused by the third party softwares such as tencent network manager,antivirus software. to solve the problem, you need to reset the network in the windows And in my windows 10 build 16278, you can find the reset network button in the setting panel

I solved the same problem by Disabling VMware virtual network adapters, and didn’t turn off IPV6. Don’t know if it would be helpful

I had this problem running apt-get. I found this solution to be helpful.

I have tried all the suggested solutions above and nothing works. But I accidentally find the solution that works for me.

  1. Delete the host file in C:\Windows\System32\drivers\etc.
  2. Repeatedly run the command that caused this error.

For example, I encountered this error when trying to run sudo -H pip install xxxx. After I deleted host file, I run this command 5 times and finally the error is gone and my installation succeeded. By the way, my Windows version is Windows 10 1709 OS Build 16299.64 and I installed WSL from Microsoft Store.