Fatal errors installing esqlite with mix

I’m playing with Phoenix and although postgres is supported by default, I wanted to tinker with n sqlite database for a project I’m working on.

It is simple enough to set up esqlite, however, when trying to run mix ecto.migrate, I bumped into the following error:

c_src/esqlite3_nif.c:21:21: fatal error: erl_nif.h: No such file or directory
compilation terminated

Mix was also good enough to inform me

** (Mix) Could not compile dependency esqlite, /home/b/.mix/rebar command failed. If you want to recompile this dependency, please run: mix deps.compile esqlite

To solve this, I had to install the erlang-dev package. I’m running Ubuntu so:

apt-get install erlang-dev

And all is right with the world again.