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

deb http://backports.debian.org/debian-backports 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 ?

  • 2
    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

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.

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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