Reputation: 2756
I tried to install Elixir on my M1 mac using brew, as explained here. After installation, elixir --version
returns segmentation fault elixir --version.
.
After reading this, I tried the suggested changes, updated the files and ran brew reinstall elixir
, but I still get the same segmentation fault elixir --version.
.
Does anyone have an idea how to get this up and running with (some recent version of) Elixir on a M1 mac? (MacBook Air (M1, 2020) Apple M1 16 GB)?
Upvotes: 9
Views: 6313
Reputation: 1560
You can install the whole environment using https://phx.tools along with the following following .kerlrc
file:
KERL_CONFIGURE_OPTIONS="\
--disable-debug \
--disable-jit \
--disable-silent-rules \
--enable-darwin-64bit \
--enable-dynamic-ssl-lib \
--enable-gettimeofday-as-os-system-time \
--enable-hipe \
--enable-kernel-poll \
--enable-shared-zlib \
--enable-smp-support \
--enable-threads \
--with-dynamic-trace=dtrace \
--with-ssl=$(brew --prefix [email protected]) \
--without-javac \
--without-jinterface \
--without-odbc \
--without-wx
"
https://elixirdrops.net/d/zP1eDXN6
I'm using that configuration on M1.
Upvotes: 0
Reputation: 23091
asdf install
" section.export KERL_BUILD_DOCS="yes"
asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git
asdf install erlang latest
+ wait for erlang to build.asdf global erlang latest
asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git
asdf install elixir latest
asdf global elixir latest
iex
to test. Done!Bonus: export ERL_AFLAGS="-kernel shell_history enabled"
to get shell history in iex
.
Upvotes: 13