How to solve “network unreachable” problem when installing the Android SDK on Gnu/Linux

When I was trying to get the Available Packages from the Android SDK and AVD Manager, I kept on getting an error saying

"Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml, reason: Network is unreachable"

Apparently others had the same problem as I had when trying to get the Android SDK to work on my Gnu/Linux box and I found the solution here.

All you have to do is edit the /etc/sysctl.d/bindv6only.conf file and change the line

net.ipv6.bindv6only = 1
to

net.ipv6.bindv6only = 0

and reboot since the kernel needs to read this option before booting

Advertisement

4 Responses

  1. You can also set this temporarily and without rebooting by typing:

    echo 0 > /proc/sys/net/ipv6/bindv6only

  2. Thanks for both solutions, they fixed my issue.

    • where do i type this in.. I am confused.

      • @rick, you have to open the file “/etc/sysctl.d/bindv6only.conf” and edit it as root. You should type something like this on your command line

        sudo emacs /etc/sysctl.d/bindv6only.conf

        Note you can use any editor that suits you, not necessarily emacs. Hope this helps

Comments are closed.

Follow

Get every new post delivered to your Inbox.