I went from asdf
package manager’s erlang, back to standard Ubuntu apt, which resulted in OTP being downgraded from 25 to 24. It also of course changed my erl
location from ~/.asdf/something
to /usr/bin/erl
. Now, whenever I try to do mix <anything>
I get this huge output error in all my existing, projects:
tttbrowne@rpi2204 ~/code/elixir/nxtest mix deps.clean --all
Mix requires the Hex package manager to fetch dependencies
Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn]
19:12:40.016 [error] Task #PID<0.109.0> started from #PID<0.94.0> terminating
** (MatchError) no match of right hand side value: {:error, {:ssl, {~c"no such file or directory", ~c"ssl.app"}}}
(mix 1.15.0-dev) lib/mix/utils.ex:644: Mix.Utils.read_httpc/1
(mix 1.15.0-dev) lib/mix/utils.ex:576: anonymous fn/2 in Mix.Utils.read_path/2
(elixir 1.15.0-dev) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
(elixir 1.15.0-dev) lib/task/supervised.ex:34: Task.Supervised.reply/4
(stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Function: #Function<5.53273782/0 in Mix.Utils.read_path/2>
Args: []
** (EXIT from #PID<0.94.0>) an exception was raised:
** (MatchError) no match of right hand side value: {:error, {:ssl, {~c"no such file or directory", ~c"ssl.app"}}}
(mix 1.15.0-dev) lib/mix/utils.ex:644: Mix.Utils.read_httpc/1
(mix 1.15.0-dev) lib/mix/utils.ex:576: anonymous fn/2 in Mix.Utils.read_path/2
(elixir 1.15.0-dev) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
(elixir 1.15.0-dev) lib/task/supervised.ex:34: Task.Supervised.reply/4
(stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Note how it asks to install Hex first, to which I answer yes. Any way to “reset” Mix somehow to take into account the new OTP installation. Note that Elixir is still asdf
-based but I’ve matched it to the Erlang version in ~/.tool-versions
so the iex
and indeed erl
interpreters are working fine:
tttbrowne@rpi2204 ~ cat .tool-versions
elixir main-otp-24
tttbrowne@rpi2204 ~ iex
Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]
Interactive Elixir (1.15.0-dev) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>