Skip to content
Advertisement

Elixir: Installing Elixir on Ubuntu kills running Couch DB instance

Recently tried to install Elixir on Ubuntu 12.0.4 with the instructions found here (basically using apt-get install elixir) – http://elixir-lang.org/install.html

Once the installation had completed, I found that I could not reach the CouchDB instance running on – http://localhost:5984.

So I tried to remove and reinstall Couch itself. After doing so, I still couldn’t reach CouchDB on localhost.

Only after removing CouchDB, Erlang and Elixir (with apt-get remove couchdb couchdb-bin erlang-base erlang-base-hipe erlang-solutions) was I able to reinstall CouchDB, with a simple apt-get install couchdb command.

I assume the Elixir installation upgrades Erlang/OTP to v18.1… Is this upgrade causing the issue? And if so, how can I work around it to use both CouchDB and Elixir on the same machine?

Advertisement

Answer

From the look of things, the standard Ubuntu Couch installation package found here – https://launchpad.net/~couchdb/+archive/ubuntu/stable – installs CouchDB ver 1.6.1, with Erlang/OTP R14 as a dependency.

When you install Elixir from the package found on the official website, it installs Erlang/OTP R18 as a dependency, overwriting any previously installed version.

Three problems with that.

  • The CouchDB installation isn’t automatically reconfigured to use the latest Erlang VM available on your machine.
  • Installing Couch from the apt get package breaks down if it finds an ‘incompatible’ Erlang/OTP VM already installed.
  • When compiling from the source found here – https://github.com/apache/couchdb – the build process will die if it finds an Erlang/OTP VM earlier than R12, or later than R17!… Apparently, Couch was patched to use Erlang R18, but it didn’t appear to work when I tried building the project from tag 1.6.1 in the github repo.

Sigh.

So in the end, I settled on using this – https://github.com/jhs/build-couchdb – Which, I think, installs a localised version of the Erlang VM in the build folder. That’s not ideal…

Once I have more information, I’ll update this answer.

Cheers for the help.

EDIT – I think it uses the same version of Erlang/OTP already installed, if available.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement