All sorts of issues with installing/upgrading Elixir
egeersoz opened this issue · 4 comments
I was previously on Elixir 1.13. Wanted to upgrade to get the latest improvements and goodies.
I ran choco upgrade elixir
and went through the prompts. Then immediately got an error running mix compile
:
16:44:06.915 [error] beam\beam_load.c(86): Error loading module ‘Elixir.Code.Formatter’:
lambda already defined for label 749. To fix this, please recompile this module with an OTP 25 compiler.
16:44:06.915 [error] Loading of c:/Program Files (x86)/Elixir/bin/…/lib/elixir/ebin/Elixir.Code.Formatter.beam failed: :badfile
** (UndefinedFunctionError) function Code.Formatter.locals_without_parens/0 is undefined (module Code.Formatter is not available)
(elixir 1.13.4) Code.Formatter.locals_without_parens()
(elixir 1.13.4) lib/code/normalizer.ex:22: Code.Normalizer.normalize/2
(elixir 1.13.4) lib/code.ex:1107: Code.quoted_to_algebra/2
According to this thread, this is because we "need to either use OTP 24 or compile Elixir from source". Which is interesting because if OTP 24 is needed, why did choco upgrade elixir
upgrade OTP to 25? 🤔
Anyway, I gave up on chocolatey and uninstalled Elixir and Erlang using choco uninstall elixir
and choco uninstall erlang
. Figured I'd just use the official Elixir installer from the website. After running that though, I’m getting this:
λ mix local.hex
12:42:27.243 [error] Task #PID<0.109.0> started from #PID<0.94.0> terminating
** (MatchError) no match of right hand side value: {:error, {:crypto, {'no such file or directory', 'crypto.app'}}}'}}}
(mix 1.14.4) lib/mix/utils.ex:647: Mix.Utils.read_httpc/1pc/1
(mix 1.14.4) lib/mix/utils.ex:579: anonymous fn/2 in Mix.Utils.read_path/2th/2
(elixir 1.14.4) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2fa/2
(elixir 1.14.4) lib/task/supervised.ex:34: Task.Supervised.reply/4ly/4
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3ly/3
Function: #Function<5.79060775/0 in Mix.Utils.read_path/2>
Args: []
At this point I'm a bit frustrated, and also stuck. Any help would be appreciated. :)
Hi @egeersoz, we don't maintain the chocolatey package, so we can't help much there. However, I can see that you were using 1.13.x and not 1.14.x, and perhaps the issue has been fixed there?
About the second failure, it seems an issue with OpenSSL installation. How did you install Erlang? I assume it was the one bundled with the Elixir installer?
Yes, I used the one bundled with the Elixir installer.
I am so sorry to hear, I am not sure about the root cause of the problem but you can try confirming it is an Erlang issue by opening the Erlang terminal and typing crypto:start().
.
If it is confirmed, then I suggested uninstalling Erlang and Elixir. Then try installing only Erlang and see if you can make the command work. Perhaps give chocolatey another try once it has been updated (and now it is maintained by the RabbitMQ team).
We are now building and shipping offline Elixir installers which are built as part of CI. See the up to date instructions on elixir-lang.org to learn more. :)