Elixir runs off of Erlang, so compatible versions must be present. In order to determine if versions are compatible, make sure the Elixir is compiled with the same Erlang OTP:
Erlang/OTP 24 [erts-12.3.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Elixir 1.13.4 (compiled with Erlang/OTP 24)
-
To view all available Erlang versions, run:
asdf list-all erlang -
To view all available Elixir versiosn, run:
asdf list-all elixir -
ASDF is used to manage various Elixir and Erlang environments. In order to install either Erlang or Elixir versions, run:
asdf install erlang { version }orasdf install elixir { version } -
In order to set, globally or locally, the either versions, run:
asdf { global or local } erlang { version }orasdf { global or local } elixir { version }
Ex.
$ asdf global erlang 22.1.7
$ asdf global elixir 1.9.4-otp-22
-
The Elixir version that is currently running can be found with:
elixir --version -
To enter the Interactive Elixir Shell, run:
iex