Install libpq-dev package error

I tried installing pg gem and I had this warning:

You need to install postgresql-server-dev-XY to create a server-side extension or libpq-dev to create a client-side application.

So, I tried installing the libpq-dev package, and I had this warning:

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

How to fix it?

+8
postgresql debian pg
source share
2 answers

This should allow you to install the package you need. Just tried it myself, I'm not sure that you will need all the packages in the second line, try 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 
+14
source share

You must install postgresql-server-dev-XY, where XY is your server version, and it will set the libpq-dev and other servers in the server-side development modules. In my case it was

 apt-get install postgresql-server-dev-9.5 

Reading package lists ... Done Creating a dependency tree Read status information ... Completed The following packages were automatically installed and were no longer required: libmysqlclient18 mysql-common Use 'apt-get autoremove' to remove them. The following additional packages will be installed:
libpq-dev Suggested packages: postgresql-doc-10 The following NEW packages will be installed: libpq-dev postgresql-server-dev-9.5

+2
source share

All Articles