Apt Error “IN6_IS_ADDR_V4MAPPED”
If you have IPv6 enabled on Windows 10 and attempt to use Apt in Ubuntu on the Windows Subsystem for Linux, you may get the following error:
http: ../sysdeps/posix/getaddrinfo.c:2603: getaddrinfo: Assertion `IN6_IS_ADDR_V4MAPPED (sin6->sin6_addr.s6_addr32)' failed. E: Method http has died unexpectedly! E: Sub-process http received signal 6.
There are a number of related issues filed on GitHub for this problem, and a whole lot of varied advice on how to solve it. There are a number of reasons why you may have this problem and how to best resolve it may depend on your configuration. In some cases, you may not be able to fix the problem. There is, however, a work-around….
Disable IPv6 for Apt
echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
With this option enabled in Apt, you should be able to run
apt-get operations using IPv4 instead.
- GitHub: [WSL Issues for IN6_IS_ADDR_V4MAPPED]
- Stack Exchange: [Convince apt-get not to use IPv6 method]