Docker Raspbian Buster



The quickest way to install Elixir is through a distribution or using one of the available installers. If not available, then we recommend the precompiled packages or compiling it.

Docker debian buster iptables

Try GitLab Ultimate for 30 days! We strongly recommend choosing the official Linux package installation since it is quicker to install, easier to upgrade, and it contains features to enhance reliability not found in other methods. Docker Compose is a tool to define and run multi-container Docker applications. Audio Resolved a bug with Debian Buster. Buster 注:Raspbian 系统由于从诞生开始就基于(为了armhf,也必须基于)当时还是 testing 版本的 7.0/wheezy,所以 Raspbian 不倾向于使用 stable/testing 表示版本。.

Note that Elixir v1.11 requires Erlang 21.0 or later. Many of the instructions below will automatically install Erlang for you. In case they do not, read the “Installing Erlang” section below.

Distributions

The preferred option for installing Elixir. Choose your operating system and tool.

If your distribution contains an old Elixir/Erlang version, see the sections below for installing Elixir/Erlang from version managers or from source.

macOS

  • Using Homebrew:
    • Update your homebrew to latest: brew update
    • Run: brew install elixir
  • Using Macports:
    • Run: sudo port install elixir

GNU/Linux

  • Alpine Linux (Community repository)
    • Run: apk add elixir
  • Arch Linux (Community repository)
    • Run: pacman -S elixir
  • Debian
    • See below the instructions for Ubuntu
  • Fedora 21 (and older)
    • Run: yum install elixir
  • Fedora 22 (and newer)
    • Run dnf install elixir erlang
  • Gentoo
    • Run: emerge --ask dev-lang/elixir
  • GNU Guix
    • Run: guix package -i elixir
  • openSUSE (and SLES)
    • Add Elixir/Erlang repository: zypper ar -f obs://devel:languages:erlang/ Elixir-Factory
    • Run: zypper in elixir
    • Optional: if you want to use the latest Erlang, you can use this repository: zypper ar -f obs://devel:languages:erlang:Factory Erlang-Factory
  • Slackware
    • Using Sbopkg:
      • Run: sbopkg -ki 'erlang-otp elixir'
    • Manually:
      • Download, build and install from SlackBuilds.org: erlang-otp, and elixir
  • Solus
    • Run: eopkg install elixir
  • Ubuntu 14.04/16.04/17.04/18.04/19.04 or Debian 7/8/9/10
    • Add Erlang Solutions repository: wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
    • Run: sudo apt-get update
    • Install the Erlang/OTP platform and all of its applications: sudo apt-get install esl-erlang
    • Install Elixir: sudo apt-get install elixir

BSD

  • FreeBSD
    • Using ports:
      • Run: cd /usr/ports/lang/elixir && make install clean
    • Using pkg:
      • Run: pkg install elixir
  • OpenBSD
    • Run: pkg_add elixir

Windows

  • Using our web installer:
    • Click next, next, …, finish
  • Using Chocolatey:
    • Run: cinst elixir

Raspberry Pi

If necessary, replace “buster” with the name of your Raspbian release.

Docker On Raspbian Buster

  • The Erlang Solutions repository has a prebuilt package for armhf. This saves a significant amount of time in comparison to recompiling natively
  • Get Erlang key and add it to the keychain:
    • Run: echo 'deb https://packages.erlang-solutions.com/debian buster contrib' | sudo tee /etc/apt/sources.list.d/erlang-solutions.list
    • Run: wget https://packages.erlang-solutions.com/debian/erlang_solutions.asc
    • Run: sudo apt-key add erlang_solutions.asc
  • Install Elixir:
    • Update apt to latest: sudo apt update
    • Run: sudo apt install elixir

Docker

If you are familiar with Docker you can use the official Docker image to get started quickly with Elixir.

  • Enter interactive mode
    • Run: docker run -it --rm elixir
  • Enter bash within container with installed elixir
    • Run: docker run -it --rm elixir bash

Those distributions will likely install Erlang automatically for you too. In case they don’t, check the Installing Erlang section below.

If you need to programmatically fetch the list of Elixir precompiled packages alongside their checksums, access https://elixir-lang.org/elixir.csv.

Docker Debian Buster Iptables

Precompiled package

Elixir provides a precompiled package for every release. First install Erlang and then download and unzip the Precompiled.zip file for the latest release.

Once the release is unpacked, you are ready to run the elixir and iex commands from the bin directory, but we recommend you to add Elixir’s bin path to your PATH environment variable to ease development.

Compiling with version managers

There are many tools that allow developers to install and manage multiple Erlang and Elixir versions. They are useful if you have multiple projects running on different Elixir or Erlang versions, can’t install Erlang or Elixir as mentioned above or if the version provided by your package manager is outdated. Here are some of those tools:

  • asdf - install and manage different Elixir and Erlang versions
  • exenv - install and manage different Elixir versions
  • kiex - install and manage different Elixir versions
  • kerl - install and manage different Erlang versions

Keep in mind that each Elixir version supports specific Erlang/OTP versions. Check the compatibility table if you have questions or run into issues.

If you would prefer to compile from source manually, don’t worry, we got your back too.

Compiling from source (Unix and MinGW)

You can download and compile Elixir in few steps. The first one is to install Erlang.

Next you should download source code (.zip, .tar.gz) of the latest release, unpack it and then run make inside the unpacked directory (note: if you are running on Windows, read this page on setting up your environment for compiling Elixir).

After compiling, you are ready to run the elixir and iex commands from the bin directory. It is recommended that you add Elixir’s bin path to your PATH environment variable to ease development.

In case you are feeling a bit more adventurous, you can also compile from master:

If the tests pass, you are ready to go. Otherwise, feel free to open an issue in the issues tracker on GitHub.

Installing Erlang

The only prerequisite for Elixir is Erlang, version 21.0 or later. When installing Elixir, Erlang is generally installed automatically for you. However, if you want to install Erlang manually, you might check:

Docker Debian Buster

  • A general list of installation methods from the Riak documentation.

After Erlang is installed, you should be able to open up the command line (or command prompt) and check the Erlang version by typing erl. You will see some information similar to:

Notice that depending on how you installed Erlang, Erlang binaries might not be available in your PATH. Be sure to have Erlang binaries in your PATH, otherwise Elixir won’t work!

Setting PATH environment variable

It is highly recommended to add Elixir’s bin path to your PATH environment variable to ease development.

On Windows, there are instructions for different versions explaining the process.

On Unix systems, you need to find your shell profile file, and then add to the end of this file the following line reflecting the path to your Elixir installation:

Docker Debian Buster Systemd

Checking the installed version of Elixir

Install Docker Raspbian Buster

Once you have Elixir installed, you can check its version by running elixir --version.