3

I have recently upgraded my ubuntu to 20.04. Now, I am trying to install the postgresql but I am getting error. I have tried to 100 different ways and crawled every web but nothing worked. These are the steps I followed:

Step 1

 sudo apt update

Step 2

sudo apt install postgresql postgresql-contrib

Here is the error log

Setting up postgresql-common (223.pgdg20.04+1) ...
dpkg: error processing package postgresql-common (--configure):
 installed postgresql-common package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of postgresql-13:
 postgresql-13 depends on postgresql-common (>= 182~); however:
  Package postgresql-common is not configured yet.

dpkg: error processing package postgresql-13 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-13; however:
  Package postgresql-13 is not configured yet.

dpkg: error processing package postgresql (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql-contrib:
 postgresql-contrib depends on postgresql-contrib-13; however:
  Package postgresql-contrib-13 is not installed.
  Package postgresql-13 which provides postgresql-contrib-13 is not configured yet.

dpkg: error processing package postgresql-contrib (--configure):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.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
                No apport report written because MaxReports is reached already
                                                                              9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.3) ...
Errors were encountered while processing:
 sysstat
 postgresql-common
 postgresql-13
 postgresql
 postgresql-contrib
E: Sub-process /usr/bin/dpkg returned an error code (1)

Somebody please help me here

Shahid Tariq
  • 886
  • 6
  • 19
  • " upgraded my ubuntu to 20.04." How did you do that? In my experience ubuntu's in-place distribution upgrades are hosed, and should not be used on any system you care about. – jjanes Dec 09 '20 at 16:51
  • I simply downloaded an ISO file and made it bootable on a USB and installed on my machine – Shahid Tariq Dec 10 '20 at 04:39
  • 2
    I've sometimes seen problems like this if you need to do a restart due to previous updates, but haven't done one yet. But you must have done more than what you describe, as you are not installing from the default repo, but rather from the PGDG repo, which is not configured by default. – jjanes Dec 10 '20 at 14:14
  • 1
    For what it's worth: I am running Postgres 13 from the PGDG repo on Ubuntu 20.04 without problems. My entry in `/etc/apt/sources.list.d/pgdg.list` is `deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main`. – Erwin Brandstetter Dec 14 '20 at 17:15

0 Answers0