Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I need both rabbitmq-server and postgresql to be installed on my machine and apt-get installing one removes the other. Here is the output from install commands:

    $ sudo apt-get install postgresql
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
        erlang-asn1 erlang-base erlang-corba erlang-crypto erlang-diameter erlang-edoc erlang-eldap erlang-erl-docgen erlang-eunit erlang-      ic erlang-inets erlang-inviso erlang-mnesia   erlang-nox erlang-odbc erlang-os-mon erlang-parsetools erlang-percept erlang-public-key erlang-runtime-tools erlang-snmp erlang-ssh       erlang-ssl erlang-syntax-tools erlang-tools erlang-webtool erlang-xmerl libkrb5-dev libodbc1 libossp-uuid16 libsctp1 lksctp-tools postgresql-client-9.1
    Use 'apt-get autoremove' to remove them.
    The following extra packages will be installed:
        postgresql-9.2 postgresql-common
    Suggested packages:
        oidentd ident-server locales-all
    The following packages will be REMOVED:
        logrotate rabbitmq-server
    The following NEW packages will be installed:
        postgresql postgresql-9.2 postgresql-common
    0 upgraded, 3 newly installed, 2 to remove and 1 not upgraded.
    Need to get 0 B/3,971 kB of archives.
    After this operation, 13.8 MB of additional disk space will be used.

and upon trying to install rabbitmq-server after installing postgres:

    $ sudo apt-get install rabbitmq-server
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
    libkrb5-dev libossp-uuid16 postgresql-client-9.1
    Use 'apt-get autoremove' to remove them.
    The following extra packages will be installed:
    Suggested packages:
    The following packages will be REMOVED:
      postgresql postgresql-9.1 postgresql-9.2 postgresql-9.2-repmgr postgresql-9.2-slony1-2 postgresql-common postgresql-contrib-9.2 postgresql-plpython-9.2 postgresql-server-dev-9.2
    The following NEW packages will be installed:
    logrotate rabbitmq-server
    0 upgraded, 2 newly installed, 9 to remove and 1 not upgraded.
    Need to get 3,753 kB/3,795 kB of archives.
    After this operation, 37.6 MB disk space will be freed.
    Do you want to continue [Y/n]? 
    Get:1 raring/main rabbitmq-server all 3.0.2-1 [3,753 kB]
    Fetched 3,524 kB in 19s (177 kB/s)                                                                                                                                                      
    (Reading database ... 337129 files and directories currently installed.)
    Removing postgresql ...
    Removing postgresql-9.1 ...
     * Stopping PostgreSQL 9.1 database server                                                                                                                                        [ OK ] 
    Removing postgresql-plpython-9.2 ...
    Removing postgresql-contrib-9.2 ...
    update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/9.2/man/man1/postmaster.1.gz because link group postmaster.1.gz is broken
    Removing postgresql-9.2-slony1-2 ...
    Removing postgresql-9.2-repmgr ...
    Removing postgresql-9.2 ...
     * Stopping PostgreSQL 9.2 database server                                                                                                                                        [ OK ] 
    Removing postgresql-server-dev-9.2 ...
    Removing postgresql-common ...
    Removing 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
    Processing triggers for ureadahead ...
    ureadahead will be reprofiled on next reboot
    Processing triggers for man-db ...
    Selecting previously unselected package logrotate.
    (Reading database ... 335927 files and directories currently installed.)
    Unpacking logrotate (from .../logrotate_3.8.3-3ubuntu2_amd64.deb) ...
    Selecting previously unselected package rabbitmq-server.
    Unpacking rabbitmq-server (from .../rabbitmq-server_3.0.2-1_all.deb) ...
    Processing triggers for man-db ...
    Processing triggers for ureadahead ...
    Setting up logrotate (3.8.3-3ubuntu2) ...
    Setting up rabbitmq-server (3.0.2-1) ...
    * Starting message broker rabbitmq-server

My django app is supposed to use postgres as the db and rabbitmq for celery ... and they both are behaving like envious girlfriends.

UPDATE: apt-cache policy

 # apt-cache policy
 Package files:
 100 /var/lib/dpkg/status
      release a=now
 500 precise-pgdg/main amd64 Packages
      release,a=precise-pgdg,n=precise-pgdg,l=PostgreSQL for Debian/Ubuntu repository,c=main
 500 raring-security/main Translation-en
 500 raring-security/main amd64 Packages
      release v=13.04,o=Ubuntu,a=raring-security,n=raring,l=Ubuntu,c=main
 500 raring-updates/universe Translation-en
 500 raring-updates/main Translation-en
 500 raring-updates/universe amd64 Packages
      release v=13.04,o=Ubuntu,a=raring-updates,n=raring,l=Ubuntu,c=universe
 500 raring-updates/main amd64 Packages
      release v=13.04,o=Ubuntu,a=raring-updates,n=raring,l=Ubuntu,c=main
 500 raring/universe Translation-en
 500 raring/main Translation-en
 500 raring/universe amd64 Packages
      release v=13.04,o=Ubuntu,a=raring,n=raring,l=Ubuntu,c=universe
 500 raring/main amd64 Packages
      release v=13.04,o=Ubuntu,a=raring,n=raring,l=Ubuntu,c=main
 Pinned packages:

apt-cache show rabbitmq-server:

 # apt-cache show rabbitmq-server
 Package: rabbitmq-server
 Priority: extra
 Section: net
 Installed-Size: 4356
 Maintainer: Ubuntu Developers <>
 Original-Maintainer: RabbitMQ Team <>
 Architecture: all
 Version: 3.0.2-1
 Depends: erlang-nox (>= 1:12.b.3), adduser, logrotate
 Filename: pool/main/r/rabbitmq-server/rabbitmq-server_3.0.2-1_all.deb
 Size: 3753308
 MD5sum: f89d5b663d67af38ea8f7948fc9ab61a
 SHA1: 30b7b865c42cd279e1194839d69fd522dc0ae12b
 SHA256: 981da016a32255f051fe43d5c6c8ed406b4f22cc8ac7c9dad01690bf42ea1959
 Description-en: AMQP server written in Erlang
 RabbitMQ is an implementation of AMQP, the emerging standard for high
 performance enterprise messaging. The RabbitMQ server is a robust and
 scalable implementation of an AMQP broker.
 Description-md5: 78e91bfb996ee4ae5d16c93298f5f6e8
 Origin: Ubuntu
 Supported: 9m
share|improve this question
What's your sources.list - are you using any 3rd party packages? I'm guessing at least the PGDG repo for PostgreSQL. Please show apt-cache policy for the relevant packages and apt-cache show rabbitmq-server –  Craig Ringer Aug 12 '13 at 12:12
@CraigRinger yes for postgres I added precise-pgdg main –  Anuvrat Parashar Aug 22 '13 at 5:18

1 Answer 1

up vote 4 down vote accepted

The problem is that the precise-pgdg postgresql packages from are compatible with raring, except for logrotate. Logrotate 3.8 changed it's config files and postgresql-9.2 will insist that you don't have a bad logrotate version relative to your postgresql version. One resolution for this is to just remove logrotate when you install postgresql-9.2.

A possible workaround would be to install precise's logrotate (which is pre-3.8). This should make both postgresql-9.2 and rabbitmq happy.

We are thinking about a workaround for, but so far no one came up with a solution that doesn't involve too much magic. (We are not going to support raring on as a separate distribution because it isn't an LTS release.)


share|improve this answer
I can confirm this works. apt-get uninstall postgresql-9.2 logrotate rabbitmq-server, download the old package, dpkg -i logrotate_3.7.8-6ubuntu5_amd64.deb, apt-get install postgresql-9.2 rabbitmq-server, ..., profit. –  sarumont Sep 11 '13 at 1:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.