1

Linux Mint 21

I try to install postgresql 9.6 like this:

sudo apt-get install postgresql-9.6

But get error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql-9.6 : Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable
                  Depends: libssl1.1 (>= 1.1.0) but it is not installable
                  Recommends: postgresql-contrib-9.6 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
3
  • Have you try sudo apt-get install postgresql? Seems like the package requirements for 9.6 are not OK for your version of distribution. Commented Aug 16, 2022 at 7:24
  • @RomeoNinov I need to install exact PostgreSQL 9.6
    – Alexei
    Commented Aug 16, 2022 at 7:29
  • Try to install w/o requirements. Try in virtual machine with other distribution. Wait Mind developers to update these two packages. Or try sudo apt-get update and then install. Commented Aug 16, 2022 at 7:36

1 Answer 1

2

(*disclaimer: newbie here so take everything with a grain of sault)

did you install the postgres certificates correctly before running installation and created "pgdg.list"?

if not here are the instruction to do so:

sudo apt install curl ca-certificates gnupg

curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg

>/dev/null

now write the pgdg.list file into /etc/apt/sources.list.d/

sudo nano /etc/apt/sources.list.d/pgdg.list

(I used nano but feel free to use the method you prefer)

inside the file write:

deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main

important: replace "buster" with your particular distribution name, you can check it by running:

lsb_release -c

now save the file and exit (ctrl+x in nano) and you should be able to install postgres succesfully now:

sudo apt update

sudo apt install postgresql-9.6

more info: Postgres Wiki Quickstart Installing Postgres 9.6 on Linux Mint 18.1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .