Last Updated: February 25, 2016
·
2.602K
· splattael

Install erlang and elixir on Ubuntu from source

Install stow package

I use stow to cleanly install/uninstall packages from source into /usr/local/stow.

apt-get install stow

Install Erlang from source

Grab latest source from http://www.erlang.org/download.html.

# unpack tar.gz
tar xvzf otp_src_17.1.tar.gz
cd otp_src_17.1/
# configure setting the target prefix
./configure --prefix=/usr/local/stow/erlang_R17.1
make
sudo make install

Now, you can stow erlang with

cd /usr/local/stow
sudo stow -v erlang_R17.1

After this step, escript is available and you are able to install Elixir from source!

Install Elixir from GitHub

Clone that latest version of Elixir from GitHub using git:

git clone https://github.com/elixir-lang/elixir.git
# build Elixir
make
# install into stow path
make install PREFIX=/usr/local/stow/elixir-master

Again, stow elixir:

cd /usr/local/stow/elixir
sudo stow -v elixir

Success!

Now elixir and iex can be used:

$ iex
Erlang/OTP 17 [erts-6.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Interactive Elixir (0.14.3-dev) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 

Enjoy!

1 Response
Add your response

Alternatively you can install Ubuntu deb packages provided by https://www.erlang-solutions.com/downloads/download-erlang-otp

over 1 year ago ·