Install libpq-dev package error

KRH picture KRH · Jun 19, 2013 · Viewed 30.4k times · Source

I tried to install pg gem and I have had this warning:

You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.

So I tried install libpq-dev package and I have had this warning:

libpq-dev : Depends: libpq5 (= 8.4.17-0squeeze1) but 9.1.9-1~bpo60+1 is to be installed

How to fix this?

Answer

mackwerk picture mackwerk · Jun 19, 2013

This should let you install the package you need :) Just tried it myself, I am not sure you will need all the packages on the second line, try it and see :)

apt-get update
apt-get install libxslt-dev libxml2-dev libpam-dev libedit-dev
aptitude install -t squeeze-backports postgresql-server-dev-9.1