Update: The below also fixes this issue

This happens because the latest release of ejabberd at the time of writing this update, has already been “locked”. Whilst the compilation issues have supposedly been fixed according to this ticket, we will have to wait for 16.07 for a tagged release that supports R19.

In a rush? Scroll to the bottom for the quick solution 🙂


On the 22nd June 2016, Erlang/OTP 19 was released to us, and with that many of us who compile ejabberd from source suddenly found we could no longer successfully compile the software. Something like the output below will look familiar too you if you’re in this situation

Ejabberd are currently working on making the source compatible with this update, but if you can’t wait and need to get this fixed now, you have 2 possible solutions, both rely on specifying the version of the packages you need.

Version pick the packages

Most package repositories provide Erlang in the form of lots of smaller “sub-packages”, so that you only need to install the bits of Erlang that you actually need to run your application. I’m currently addressing this problem on Ubuntu 14.04 so i have to use the APT version specification of package=version. I’m using aptitude as personal preference, but a quick google search will find your the equivalent apt-* command if you prefer those.

The first thing to do is find out which versions of erlang you have available, to do that run the following command and check the output

You want to avoid version 19, so just note down the latest version of v18, so for me thats 1:18.2

Now it’s simply a case of dropping that version onto the end of the package list. The below packages seemed to work for me, however if you have 3rd party plugins too compile, you may need to add any unmet dependencies too this list.

Enter your own version here:

That’s all you should need to do in order to get ejabberd to compile 🙂

But… There is an easier method

Whilst the above works and keeps your dependency on external providers as limited as possible, there is an alternative solution. Erlang Solutions provide a public repository with single all-in-one packages of Erlang (along with the sub-packages as normal), so rather than having to install each package separately, you can just install one single package containing them all. Of course this means you lose the ability to cherry pick the pieces you want, however i doubt that’s a concern for most.

Before I show you this simpler method, do note that because it’s a completely different package to the normal Erlang packages, any other Erlang applications that you might install from a package repository might complain of unmet dependencies and try to install the default Erlang packages due to them specifying “erlang” as a depenency (whilst we’ll be installing “esl-erlang”).

All of the instructions you need can be found here: https://www.erlang-solutions.com/resources/download.html

Essentially we just need to install the new repository, then install esl-erlang and we’re done.

That last command just version locks Erlang so if we run aptitude upgrade at any point, we’ll not end up upgrading Erlang to v19, once Ejabberd has confirmed it has fixed the issues, you can unlock the constraint with: