Installing Elixir on a Raspberry Pi, the easy way
by Ju Liu
In this tutorial we will go through the easiest way of installing the latest and greatest versions of Erlang and Elixir on your Raspberry Pi. Since the Raspberry is still a fairly low-powered device, we will use precompiled packages instead of compiling everything from source. This will also help us to keep our system updated in the future.
We assume that you are using the latest Raspbian OS, codenamed Jessie, but this guide should reasonably work for every future version of Raspbian as well.
So first of all let’s add the Erlang Solutions repository:
$ wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb && rm erlang-solutions_1.0_all.deb
Then we can update our sources and install Erlang and Elixir (we will also
erlang-dev which includes development libraries useful for many Elixir
$ sudo apt-get update && sudo apt-get install erlang erlang-dev elixir
To check that the installation worked, type this in your console:
and you should be greeted by the familiar Elixir shell:
$ iex Erlang/OTP 18 [erts-7.3] [source] [smp:4:4] [async-threads:10] [kernel-poll:false] Interactive Elixir (1.4.0) - press Ctrl+C to exit (type h() ENTER for help) iex(1)> IO.puts "Hello from Elixir!" Hello from Elixir! :ok