Installing hex in Debian 10 gives this error

Installing hex in Debian 10 gives this error,

mix local.hex
** (UndefinedFunctionError) function :inets.stop/2 is undefined (module :inets is not available)
:inets.stop(:httpc, :mix)
(mix) lib/mix/utils.ex:560: Mix.Utils.read_httpc/1
(mix) lib/mix/utils.ex:501: Mix.Utils.read_path/2
(mix) lib/mix/local.ex:149: Mix.Local.read_path!/2
(mix) lib/mix/local.ex:126: Mix.Local.find_matching_versions_from_signed_csv!/2
(mix) lib/mix/tasks/local.hex.ex:56: Mix.Tasks.Local.Hex.run_install/1
(mix) lib/mix/task.ex:316: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:79: Mix.CLI.run_task/2

What is wrong?

Hi @Nvim! How did you install Elixir and Erlang on that machine? Thanks

1 Like

erl -v
Erlang/OTP 21 [erts-10.2.4] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1]

elixir -v
Erlang/OTP 21 [erts-10.2.4] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1]

Elixir 1.7.4 (compiled with Erlang/OTP 21)

Not the version, but how did You install… :slight_smile:

Via package manager, or asdf, or other

1 Like

Thank you for the replies I got it working by getting repo directly from source, package manager never works.

Which repos did you get from source and how did you install them from the source code? :slight_smile:

downloaded the .deb file from Erlang Solutions.

Sadly often true for a few Linux distros. For Erlang, Elixir and Node, I always use asdf these days. Will likely extend my usage of it to other languages/runtimes as well.

1 Like

sudo apt-get install erlang-inets

should resolv your issues.

2 Likes