Search code examples
ubunturabbitmqamqp

Simple way to install RabbitMQ in Ubuntu?


Is there any simple way to install RabbitMQ for Ubuntu? I did the the following:

Add the following line to /etc/apt/sources.list:

deb http://www.rabbitmq.com/debian/ testing main  

then install with apt-get:

$ sudo apt-get install rabbitmq-server

But I get the following error every time:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 rabbitmq-server: Depends: erlang-nox (>= 1:12.b.3) but 1:11.b.5dfsg-11 is to be     installed
 E: Broken packages

How am I supposed to install dependencies and to control the version of erlang-nox since it is installed already?


Solution

  • The simplest way is to remove any trace of Erlang or RabbitMQ on your system, then go to http://www.erlang-solutions.com/section/132/download-erlang-otp for an Ubuntu Erlang binary (the VM that runs RabbitMQ) and then go here http://www.rabbitmq.com/download.html to get RabbitMQ.

    For Erlang, choose 64 bit or the unspecified one (32 bit) depending on your OS version. There is only one binary of RabbitMQ that is fully cross platform, i.e. no change between 32 bit and 64 bit.

    Get those running and you have the latest and best of both packages which are both under very active development.

    That is the simplest way when you take into account the future problems that you will avoid.

    Personally I would also recommend keeping mission critical application packages outside of the usual Linux filesystem layout. Whether you choose to put them in /opt, or /home/erlang or /apps or /packages doesn't matter. The important thing is to take full control of these packages and don't let the OS package manager drive your decision making.