If you have trouble installing Elixir
on your Mac
with an M1 (and M2, M3, etc.) processor.
using brew,
these are the detailed steps you need!
If you don't already have Homebrew on your Mac,
get it at:
brew.sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"brew install autoconf automake coreutils curl fop libtool libxslt libyaml readline unixodbc unzip
In case you're wondering what these are:
autoconf- configuration tool https://en.wikipedia.org/wiki/Autoconfautomake- streamlines compilation https://en.wikipedia.org/wiki/Automakecoreutils- basic primitives for unix systems: https://en.wikipedia.org/wiki/GNU_Core_Utilitiescurl- fetching remote data https://en.wikipedia.org/wiki/CURLfop- to generatepdfdocs: https://xmlgraphics.apache.org/fop Install to avoid errors: https://stackoverflow.com/questions/64281355/fop-is-missinglibtool- for compiling on different Operating Systems ... https://en.wikipedia.org/wiki/GNU_Libtoollibxslt-XSLTimplementation for parsingXMLhttps://en.wikipedia.org/wiki/Libxsltlibyaml-YAMLparser and emitter library: https://pyyaml.org/wiki/LibYAMLreadline- in-line editing and history capabilities for interactive programs with a command-line interface https://en.wikipedia.org/wiki/GNU_Readlineunixodbc- implements theODBCAPI https://en.wikipedia.org/wiki/UnixODBCunzip- unzip files: https://en.wikipedia.org/wiki/ZIP_(file_format)
The reason we originally needed these more detailed installation instructions ...
Erlang (on Mac) is not compatible with openssl higher than 1.1.
brew install openssl@1.1brew unlink openssl@2brew unlink openssl@3brew link openssl@1.1asdf is a version manager that lets you
easily run multiple versions of Elixir, Node.js, Python, etc.
github.com/asdf-vm/asdf
brew install asdfRef: asdf-vm.com/guide/getting-started
asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.gitFollowed by:
asdf install erlang 26.2Ref: github.com/asdf-vm/asdf-erlang
asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.gitRef: github.com/asdf-vm/asdf-elixir
Then:
asdf install elixir 1.16.0-otp-25Credit for this guide goes to
@mdapper
for their post:
devheroes.io/en/erlang-elixir-macos-m1
at the time of writing
it was 18 months old
and required updating
but is still a great starting point.