Installing Erlang & Elixir on M1 Macs

This week I have a new macbook pro M1, an amazing computer. After several times install erlang and elixir with but dont have any luck. Then I have a solution is install erlang by brew, then reshim to asdf, this solution was suggested by this comment on…


This content originally appeared on DEV Community and was authored by phathdt

This week I have a new macbook pro M1, an amazing computer. After several times install erlang and elixir with but dont have any luck. Then I have a solution is install erlang by brew, then reshim to asdf, this solution was suggested by this comment on GitHub

I assume you have installed asdf already, but here is the full installation command I use

brew install asdf autoconf wxmac openssl@1.1 fop coreutils automake libyaml readline libxslt libtool unixodbc unzip curl

Please note that you should install and using openssl@1.1 because Erlang doesn't support openssl 3 yet. If you already install the latest version, please try unlink and link version openssl@1.1

brew unlink openssl@3 
brew link openssl@1.1

Next is add plugin erlang asdf

asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git

Now you are ready to install Erlang 24 and Elixir 1.12.3 using brew and reshim to asdf

brew install erlang@24 
cp -r /opt/homebrew/opt/erlang@24/lib/erlang ~/.asdf/installs/erlang/24.1.7
asdf reshim erlang 24.1.7
asdf global erlang 24.1.7 
asdf install elixir 1.12.3-otp-24
asdf global elixir 1.12.3-otp-24

to install another version ( 23 for me )

brew unlink erlang@24 
brew install erlang@23 
cp -r /opt/homebrew/opt/erlang@23/lib/erlang ~/.asdf/installs/erlang/23.3.4.9
asdf reshim erlang 23.3.4.9
asdf global erlang 23.3.4.9 
asdf install elixir 1.10.4-otp-23
asdf global elixir 1.10.4-otp-23

Please remember switch version erlang before install elixir

after these step, you can use asdf to switch version erlang instead of using brew

PS: you could check detail version erlang install brew at this
PS: you could try update to Mac Monterey, it will fix some issue with rosetta


This content originally appeared on DEV Community and was authored by phathdt


Print Share Comment Cite Upload Translate Updates
APA

phathdt | Sciencx (2021-12-09T16:59:26+00:00) Installing Erlang & Elixir on M1 Macs. Retrieved from https://www.scien.cx/2021/12/09/installing-erlang-elixir-on-m1-macs/

MLA
" » Installing Erlang & Elixir on M1 Macs." phathdt | Sciencx - Thursday December 9, 2021, https://www.scien.cx/2021/12/09/installing-erlang-elixir-on-m1-macs/
HARVARD
phathdt | Sciencx Thursday December 9, 2021 » Installing Erlang & Elixir on M1 Macs., viewed ,<https://www.scien.cx/2021/12/09/installing-erlang-elixir-on-m1-macs/>
VANCOUVER
phathdt | Sciencx - » Installing Erlang & Elixir on M1 Macs. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/09/installing-erlang-elixir-on-m1-macs/
CHICAGO
" » Installing Erlang & Elixir on M1 Macs." phathdt | Sciencx - Accessed . https://www.scien.cx/2021/12/09/installing-erlang-elixir-on-m1-macs/
IEEE
" » Installing Erlang & Elixir on M1 Macs." phathdt | Sciencx [Online]. Available: https://www.scien.cx/2021/12/09/installing-erlang-elixir-on-m1-macs/. [Accessed: ]
rf:citation
» Installing Erlang & Elixir on M1 Macs | phathdt | Sciencx | https://www.scien.cx/2021/12/09/installing-erlang-elixir-on-m1-macs/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.