Installing Elixir on Mac OS


Soon as I hit Programming Elixir Chapter 5 I found I needed to start testing some of the concepts.

You can install Livebook or install the command line environments.

Here’s how I installed Elixir on my Mac OS 13.1 (Ventura) environment.

  1. Install Xcode Command Line Tools

  2. Install Homebrew

  3. Install asdf:

    brew install asdf
    # Apache Formatting Objects Processor for PDF generation.
    brew install fop

  4. Add asdf.sh to the zshrc configuration file.

    echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ZDOTDIR:-~}/.zshrc

  5. Exit and restart terminal.

  6. Install Erlang and Elixir plugins.

    asdf plugin-add erlang
    asdf plugin-add elixir

  7. Get list of available Erlang/OTP and Elixir versions.

    asdf list-all erlang
    asdf list-all elixir

  8. Check the Elixir/Erlang compatibility chart to determine which versions to install. Erlang versions are listed as OTP versions.

  9. Install the latest (2023-01-02) versions. Grab a cup of tea as the Erlang build takes some time.

    asdf install erlang 25.2
    asdf install elixir 1.14.2-otp-25

    • Erlang generates warnings about jinterface and odbc being disabled. Neither are required at this time.
  10. Install Erlang/OTP and Elixir versions globally while learning.

    asdf global erlang 25.2
    asdf global elixir 1.14.2-otp-25

  11. Test by starting IEx:

    iex

All notes and comments are my own opinion. Follow me at @rgacote@genserver.social