I am trying to install Postgresql on my brand new Ubuntu 15.04 installation and run into this error:
The following packages have unmet dependencies:
libpq-dev : Depends: libpq5 (= 9.4.1-1.pgdg12.4+1) but 9.4.1-1.pgdg14.04+1 is to be installed
E: Unable to correct problems, you have held broken packages.
Here are the steps I normally do to install PostgreSQL:
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-common
sudo apt-get install postgresql-9.4-postgis-2.1 pgadmin3
This works fine on my 14.04 LTS release. Any ideas how this can be fixed?
Use:
to see the list of held packages and use:
to un-hold them. After his remove the package causing problem using
sudo apt-get remove