Installing Elixir on a Raspberry pi the easy way

2017-05-02 by Ju Liu

Learn more about how Erlang Solutions can support you with Elixir Development or sign up to our mailing list to be notified of our future blog posts.

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 install erlang-dev which includes development libraries useful for many Elixir packages):

$ sudo apt-get update && sudo apt-get install erlang erlang-dev elixir

To check that the installation worked, type this in your console:

$ iex

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

Happy hacking!

Learn more about how Erlang Solutions can support you with Elixir Development or sign up to our mailing list to be the first to know about our future blog posts.

We thought you might also be interested in