beno

beno

State of Elixir packages on CentOS 7?

I am in the process of setting up a new server for some project and this one has CentOS 7 on it (new to me). To my surprise, there is no support for elixir in their yum package manager and the only rpm package I could find is for version 0.12 (!). CentOS is a pretty popular server platform I think, so I didn’t expect that.

Now building from source always possible of course, even though it is something the CentOS people expressly advise against, but in general I noticed a very mixed picture when it comes to package support for various platforms: https://pkgs.org/download/elixir

Is that something we can fix? I think it is holding back the language unnecessarily. Has anyone else encountered this?

Marked As Solved

outlog

outlog

I would suggest using something like https://github.com/asdf-vm/asdf - you want dev/staging/prod to have as matching as possible installs - and you’ll also want to be prepared for zero-day updates, and not be in the hands of a specific distro package maintainer… you might also want to run multiple versions of erlang/elixir on a single server…

Also Liked

easco

easco

I was also surprised to find that Elixir doesn’t have community support for CentOS. For a project I worked on several months ago, I have an Ansible script that install Erlang and Elixir to a CentOS build server. It grabs Erlang from the Erlang Solutions build and then installs Elixir from source. The relevant parts are reproduced below in the hopes that it will help. (For deployments we used Distillery and ERTS)

  vars:
    erlang_dev_dependencies:
      - git
      - gcc
      - gcc-c++
      - glibc-devel
      - make
      - ncurses-devel
      - openssl-devel
      - autoconf
      - java-1.8.0-openjdk-devel
      - wxBase.x86_64

  - name: install epel-release
    yum: 
      update_cache: yes 
      name: epel-release
      state: present

  - name: Install pacackages required to build erlang
    yum: 
      name: "{{ item }}"
    with_items: "{{ erlang_dev_dependencies }}"
  
  - name: Download erlang-solutions rpm package
    get_url: 
      url: http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
      dest: ./erlang-solutions-1.0-1.noarch.rpm

  - name: install erlang from that package
    yum: name=./erlang-solutions-1.0-1.noarch.rpm

  - name: install erlang
    yum: name=erlang

  - name: Create source directory
    file: path=/root/src state=directory

  - name: clone elixir repo
    git:
      repo: https://github.com/elixir-lang/elixir.git
      dest: /root/src/elixir
      version: v1.6

  - name: build and test Elixir
    make:
      chdir: /root/src/elixir
      target: test

  - name: Install Elixir
    make:
      chdir: /root/src/elixir
      target: install
OvermindDL1

OvermindDL1

I also highly recommend this. Using Erlang/Elixir on RHEL and similar ones is always so sorely out of date otherwise… Or Docker.

AstonJ

AstonJ

Agree too!

Even with Ruby (and things like Postgresql) I do not use the CentOS versions - CentOS prefer stable/old packages and while that’s great for system components, when it comes to things like languages you’ll usually want to use more recent versions :smiley:

Same with different versions - some of my Ruby apps for example, use different Ruby versions.

rodrigues

rodrigues

Hi, I need to deploy a few applications to CentOS 7 servers; I didn’t need to install erlang or elixir in the target production/staging machines, as the runtime comes bundled with the application release.

The CentOS edeliver release build machine needs these installed, and for that, I use the github releases from both OTP and Elixir:

Erlang/OTP: https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz
Elixir: https://github.com/elixir-lang/elixir/archive/v${ELIXIR_VERSION}.tar.gz

Where Next?

Popular in Questions Top

srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New

We're in Beta

About us Mission Statement