Can't install libpq-dev, ubuntu 10.10 and postgres 9

Solution 1:

I solved this for myself by running:

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

Automatically fixed dependencies.