installationerlangelixirapple-m1asdf

Install Erlang and Elixir on MacOS M1 - Command not found


i'm trying to install specific version of Erlang and Elixir on macos M1

I don't use brew because i can't specify version (brew installs only last version apparently)

I used ASDF with this .tool-versions files:

elixir 1.12.3
erlang 24.2
nodejs 16.5.0

but after installation, I met some errors command are not found when I type

elixir --version
iex
..
asdf plugin add erlang
asdf plugin add elixir
asdf plugin add nodejs

asdf install

I don't understand how to precise the path Should I precise something in $HOME/.zshrc ?


Solution

  • I'm including this as an answer for visibility (see Aleksei's comment):

    After installing asdf (as with many CLI software), you must restart your shell (e.g. by opening a new Terminal window) or you must (re)source your profile (e.g. source ~/.zshrc). This causes asdf to run its boot-strapping script -- e.g. . /opt/homebrew/opt/asdf/libexec/asdf.sh, which establishes paths etc.

    When you install asdf (as with lots of CLI software), pay close attention to the messages displayed in the terminal: usually there are helpful messages there that remind you to do things like this.