0

When I run apt-get upgrade, I get the following error :

dpkg: dependency problems prevent configuration of postgresql-9.1:
 postgresql-client-9.1 (9.1.7-0ubuntu12.04) breaks postgresql-9.1 (<< 9.1.7-0ubuntu12.04) and is installed.
  Version of postgresql-9.1 to be configured is 9.1.6-1~precise2.
dpkg: error processing postgresql-9.1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-9.1; however:
  Package postgresql-9.1 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          No apport report written because the error message indicates its a followup error from a previous failure.
                               No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                                                         No apport report written because MaxReports is reached already
                  dpkg: dependency problems prevent configuration of postgresql-contrib-9.1:
 postgresql-contrib-9.1 depends on postgresql-9.1 (= 9.1.7-0ubuntu12.04); however:
  Version of postgresql-9.1 on system is 9.1.6-1~precise2.
dpkg: error processing postgresql-contrib-9.1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql-contrib:
 postgresql-contrib depends on postgresql-contrib-9.1; however:
  Package postgresql-contrib-9.1 is not configured yet.
dpkg: error processing postgresql-contrib (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 postgresql-9.1
 postgresql
 postgresql-contrib-9.1
 postgresql-contrib
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried apt-get -f upgrade but the same error occurs.

What can I do to fix this issue? It totally messes up APT.

Note: I'm using the following PPA for PostgreSQL : https://launchpad.net/~pitti/+archive/postgresql

Update: Sorry for the formatting, here is a gist https://gist.github.com/e0752bb50e63ef4b3a4c

1

I had the same problem. apt-get -f install doesn't worked. With aptitude it worked.

aptitude -f install removed postgres but not the databases. Afterwards apt-get install postgres reinstalled postgres. Happy again :-)

0

Had same problem on a test machine some time ago.
I just disabled the pitti, uninstalled, cleaned, reinstalled, enabled pitti, updated. Maybe I am missing some steps but for me it helped.
Relevant lines from history:

sudo vim /etc/apt/sources.list.d/ubuntugis-ppa-precise.list
sudo vim /etc/apt/sources.list.d/pitti-postgresql-precise.list
sudo apt-get remove postgresql-9.1
sudo apt-get remove postgresql-client-9.1
sudo apt-get clean
sudo apt-get update
sudo apt-get install postgresql-9.1
sudo apt-get install postgresql-9.1-postgis 
sudo apt-get install postgresql-contrib-9.1 
sudo vim /etc/apt/sources.list.d/pitti-postgresql-precise.list
sudo vim /etc/apt/sources.list.d/ubuntugis-ppa-precise.list 
sudo apt-get update
sudo apt-get upgrade
  • BTW you could probably sudo su - once and then run all the commands without having to prefix them all with sudo! – slm Jan 20 '13 at 1:24
  • I am aware of that possibility and use it where appropriate, but I usually use sudo because of nice lines in /var/log/auth.log (logs user and command). Additionally I like to work on user privileges, and gain elevated privileges specifically for one line. – Elary Jan 20 '13 at 3:49
  • 1
    Does the uninstall clean the existing databases or are they kept? – OyoKooN Jan 29 '13 at 19:36
  • When I run apt-get remove postgresql-9.1, the same error message appears... – OyoKooN Feb 4 '13 at 18:56
  • @OyoKooN: I wonder the same. 99% sure I would say NO. 'apt-get purge' would delete it. 'apt-get remove' not. But 99% is not enough for a production DB ;-) – alfonx Feb 13 '13 at 8:55

Your Answer

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

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