Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a fresh Debian 6.0 install. I have installed build-essential and added:

deb squeeze-backports main

in /etc/apt/sources.list

I now try to install Postgres 9.1 but I have the following error:

The following packages have unmet dependencies:
 postgresql-9.1 : Depends: libpq5 (>= 9.1~) but 8.4.12-0squeeze1 is to be installed
                  Depends: postgresql-client-9.1 but it is not going to be installed
                  Depends: postgresql-common (>= 115~) but 113 is to be installed

Is there any additional stuff to install prior the postgres installation ?

share|improve this question
what command did you run to install postgres? apt-get -t squeeze-backports install postgresql-9.1 ? – cas Aug 1 '12 at 9:42
I used the command: apt-get install postgresql-9.1 – Luc Aug 1 '12 at 9:52
try the -t squeeze-backports option as in my comment/question or Womble's answer. What he said is exactly right. – cas Aug 1 '12 at 10:00
up vote 7 down vote accepted

Well, build-essential is irrelevant to this problem. You're not installing the package correctly; use the -t squeeze-backports option to make the backports repository the "default" repository for the purposes of this apt-get run, which should allow the correct versions of the dependent packages to be installed. You're getting the error you are now because whilst postgresql-9.1 isn't available in squeeze, and therefore will be installed from the backports repo, the other packages do have available versions in squeeze, and due to the low default priority of backports repositories, the versions of the packages in squeeze are being preferred.

share|improve this answer
Thanks, this is working fine with the -t option. I talked about build-essential to show only that packages have been isntalled on the fresh Debian 6.0 – Luc Aug 1 '12 at 11:02

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.