2

I'm running into the following error when I'm installing any package on 12.04.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 postgresql-client-9.1 : Breaks: postgresql-9.1 (< 9.1.7-0ubuntu12.04) but 9.1.6-1~precise2 is installed
E: Unmet dependencies. Try using -f.

Tried following commands,

sudo apt-get autoremove
sudo apt-get autorclean
sudo apt-get install -f
sudo apt-get purge postgresql
sudo apt-get purge postgresql-client-9.1
sudo apt-get autoremove --purge postgresql-client-9.1
sudo apt-get autoremove --purge postgresql
sudo apt-get remove --dry-run postgresql
sudo apt-get update

etc. But none of this could save me. Any idea?

Eliah Kagan
  • 117,780
sjn
  • 151
  • I have seen those similar post. But didn't help. – sjn Dec 27 '12 at 07:29
  • Yes I might have scratched only the surface of methods from that answer. To be honest, I was bit frustrated seeing this issue popped up. I've been using Ubuntu exclusively for the past 3+ years, and wanted these things to be smooth; has been very pleasant for most of the time. But anyway I got past the issue by removing the packages using 'dpkg -r' itself (Answer added) – sjn Dec 29 '12 at 02:06

3 Answers3

1

I had a similar problem , and this solved it.

add-apt-repository ppa:pitti/postgresql
apt-get purge postgresql*
apt-get install update && apt-get install upgrade
apt-get install postgresql
apt-get update && apt-get upgrade
Nishant
  • 111
1

Got rid of these error by removing those Postgresql (and client-9.1) using 'dpkg -r' directly.

sudo dpkg -r postgresql
sudo dpkg -r postgresql-client-9.1
sjn
  • 151
0

I had this problem which was a result of version incompatibility between binaries in the standard Ubuntu repository and in pitti. I resolved it by removing postgresql-client metapackage. Hope this helps.

Aditya
  • 13,416