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 generatepdf
docs: 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
-XSLT
implementation for parsingXML
https://en.wikipedia.org/wiki/Libxsltlibyaml
-YAML
parser 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 theODBC
API 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 [email protected]
brew unlink openssl@2
brew unlink openssl@3
brew link [email protected]
asdf
is a version manager that lets you
easily run multiple versions of Elixir
, Node.js
, Python
, etc.
github.com/asdf-vm/asdf
brew install asdf
Ref: asdf-vm.com/guide/getting-started
asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git
Followed by:
asdf install erlang 26.2
Ref: github.com/asdf-vm/asdf-erlang
asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git
Ref: github.com/asdf-vm/asdf-elixir
Then:
asdf install elixir 1.16.0-otp-25
Credit 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.