Created
September 9, 2011 02:35
-
-
Save alphazero/1205366 to your computer and use it in GitHub Desktop.
how to install erlang/otp on a fresh OS X Lion (system wide)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# logged in as admin account | |
# xcode 4 already installed | |
# java already installed | |
# standard place to install on OS X | |
cd /usr/share | |
# I like to keep sources around when building | |
# /etc/share/src doesn't exists, so just create it | |
sudo mkdir src | |
cd src | |
# didn't have wget installed so just curl it | |
sudo curl -o otp_src_R14B03.tar.gz http://erlang.org/download/otp_src_R14B03.tar.gz | |
# unzip/tar | |
tar zxvf otp_src_R14B03.tar.gz | |
# cd to toplevel src folder | |
cd otp_src_R14B03 | |
# configure make | |
# flag is apparently required for 10.7/xcode4 per internet lore | |
# standard install place is /usr/share/ | |
# enable threads | |
# set sys arch | |
# (I used sudo for everything) | |
sudo CFLAGS=-O0 ./configure --prefix=/usr/share/erlang --enable-threads --enable-darwin-64bit | |
# make and install it | |
sudo make | |
sudo make install | |
# check it -- you should get the erlang shell | |
/usr/share/erlang/bin/erl | |
# now set the system wide path | |
cd /etc/paths.d | |
sudo touch erlang | |
sudo vim erlang | |
# in vim add this line and save it | |
/usr/share/erlang/bin | |
# end. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment