1

Getting error when installing Elixir dependencies, all Mix command are throwing same exception

23:31:44.447 [notice] Application ssl exited: exited in: :ssl_app.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (ArgumentError) could not call Module.put_attribute/3 because the module xyz.MixProject is already compiled
            (elixir 1.15.4) lib/module.ex:2310: Module.assert_not_readonly!/2
            (elixir 1.15.4) lib/module.ex:2007: Module.__put_attribute__/5
            (ssl 11.0.2) ssl_app.erl:35: :ssl_app.stop/1
            (kernel 9.0.2) application_master.erl:293: :application_master.start_it_old/4

23:31:44.455 [notice] Application public_key exited: :stopped

23:31:44.455 [notice] Application asn1 exited: :stopped

23:31:44.455 [notice] Application crypto exited: :stopped

23:31:44.456 [error] Task #PID<0.113.0> started from #PID<0.98.0> terminating
** (MatchError) no match of right hand side value: {:error, {:ssl, {:bad_return, {{:ssl_app, :start, [:normal, []]}, {:EXIT, {%ArgumentError{message: "could not call Module.put_attribute/3 because the module xyz.MixProject is already compiled"}, [{Module, :assert_not_readonly!, 2, [file: ~c"lib/module.ex", line: 2310]}, {Module, :__put_attribute__, 5, [file: ~c"lib/module.ex", line: 2007]}, {:ssl_app, :stop, 1, [file: ~c"ssl_app.erl", line: 35]}, {:application_master, :start_it_old, 4, [file: ~c"application_master.erl", line: 293]}]}}}}}}
    (mix 1.15.4) lib/mix/utils.ex:661: Mix.Utils.read_httpc/1
    (mix 1.15.4) lib/mix/utils.ex:589: anonymous fn/2 in Mix.Utils.read_path/2
    (elixir 1.15.4) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
    (elixir 1.15.4) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: #Function<5.80278363/0 in Mix.Utils.read_path/2>
    Args: []
** (EXIT from #PID<0.98.0>) an exception was raised:
    ** (MatchError) no match of right hand side value: {:error, {:ssl, {:bad_return, {{:ssl_app, :start, [:normal, []]}, {:EXIT, {%ArgumentError{message: "could not call Module.put_attribute/3 because the module xyz.MixProject is already compiled"}, [{Module, :assert_not_readonly!, 2, [file: ~c"lib/module.ex", line: 2310]}, {Module, :__put_attribute__, 5, [file: ~c"lib/module.ex", line: 2007]}, {:ssl_app, :stop, 1, [file: ~c"ssl_app.erl", line: 35]}, {:application_master, :start_it_old, 4, [file: ~c"application_master.erl", line: 293]}]}}}}}}
        (mix 1.15.4) lib/mix/utils.ex:661: Mix.Utils.read_httpc/1
        (mix 1.15.4) lib/mix/utils.ex:589: anonymous fn/2 in Mix.Utils.read_path/2
        (elixir 1.15.4) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
        (elixir 1.15.4) lib/task/supervised.ex:36: Task.Supervised.reply/4

Tried solutions

  1. https://dev.to/onpointvn/installing-erlang-elixir-on-m1-macs-1b8g
  2. https://rajrajhans.com/2022/10/installing-elixir-on-mac-m1/

Followed https://github.com/asdf-vm/asdf-erlang#osx section before installing erlang

MacBook Pro M2 - OS 13.4.1

Terminal - Rosetta

OpenSSL 3.1.2 1 Aug 2023 (Library: OpenSSL 3.1.2 1 Aug 2023)

Erlang/OTP 26 [erts-14.0.2] [source] [64-bit

Elixir 1.15.4 (compiled with Erlang/OTP 26)

Mix 1.15.4 (compiled with Erlang/OTP 26)

Node v18.15.0

NPM 9.5.0

.zshrc file enter image description here

Do anyone know why I'm getting error related to SSL? and how I can solve it?

1

1 Answer 1

0

On native terminal install homebrew and follow https://elixir-lang.org/install.html#macos

Make sure all required dependencies must be installed with same homebrew

https://stackoverflow.com/a/76957979/11141189

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.