Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
I have seen those similar post. But didn't help. –  sjn Dec 27 '12 at 7: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 2:06
add comment

3 Answers 3

up vote 1 down vote accepted

Got ride 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
share|improve this answer
add comment

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.

share|improve this answer
    
Got the same error while removing postgresql-client unfortunately. –  sjn Dec 29 '12 at 1:58
add comment

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.