I can not install libpq-dev for postgresql, i tried

sudo apt-get install libpq-dev 

and output

Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libpq-dev : Depends: libpq5 (= 9.3.9-0ubuntu0.14.04) but 9.4.4-1.pgdg14.04+1 is to be installed E: Unable to correct problems, you have held broken packages. 

how to fix this problem?

2

3 Answers

Problem is solved!

I solved this with remove libpq5 :

sudo apt-get remove libpq5 sudo apt-get install libpq-dev 
3

To fix this, I had to add postgresql's repo:

sudo sh -c 'echo "deb $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' wget --quiet -O - | sudo apt-key add - sudo apt-get -y update sudo apt-get remove libpq5 sudo apt-get install libpq-dev 
1

The problem can be solved via following steps :

sudo apt-get update sudo apt-get remove libpq5 sudo apt-get install libpq-dev 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy