Can't install hex. How to set proxy for mix?

output of mix local.hex commend:

15:12:33.910 [error] Process #PID<0.145.0> raised an exception
** (ErlangError) Erlang error: :eacces
erlang.erl:2272: :erlang.open_port({:spawn, 'inet_gethost 4 '}, [{:packet, 4}, :eof, :binary])
(kernel 7.3) inet_gethost_native.erl:184: :inet_gethost_native.server_init/2

15:12:33.911 [error] GenServer :inet_gethost_native_sup terminating
** (stop) :eacces
erlang.erl:2272: :erlang.open_port({:spawn, 'inet_gethost 4 '}, [{:packet, 4}, :eof, :binary])
(kernel 7.3) inet_gethost_native.erl:184: :inet_gethost_native.server_init/2
Last message: {:EXIT, #PID<0.145.0>, {:eacces, [{:erlang, :open_port, [{:spawn, 'inet_gethost 4 '}, [{:packet, 4}, :eof, :binary]], [file: ‘erlang.erl’, line: 2272]}, {:inet_gethost_native, :server_init, 2, [file: ‘inet_gethost_native.erl’, line: 184]}]}}
** (Mix) httpc request failed with: {:failed_connect, [{:to_address, {‘’, 443}}, {:inet, [:inet], {:eoptions, {:could_not_start_server, :inet_gethost_native}}}]}

Could not install Hex because Mix could not download metadata at

Alternatively, you can compile and install Hex directly with this command:

mix archive.install github hexpm/hex branch latest

i can download this file on browser.

system:windows10 home license

Could this be the Windows firewall getting in the way?

My english is pretty bad, I am sorry for that. I use huorong security software to manage firewall. I close it (maybe not enough) and try again, unfortunately it doesn’t work. Somebody told me I should use router’s proxy but I don’t know how to do it now. I will try it someday. Thank you very much!

Can you try this?

  • Disable your antivirus software
  • Disable Windows firewall
  • Start a command line shell as an Administrator
  • Try installing hex again

Oh I find I make mistake about disabling firewall, now it closed, but It’s still not working. Actually, I take four hours to installing hex two week ago and I tired for that. I was read ‘rust by example’ last week and I think it is fun. So, this problem is not very important now. Thanks again.

Well, this can be solved for sure.

I wonder if somebody from the core team knows about a Chinese mirror of