Score:1

Can't install PostrgreSQL 9.6 - Couldn't find any package by glob 'postgresql-9.6'

ky flag

Given

Ubuntu 22.04

I try to install PostgreSQL 9.6 (I need exact this version) like this:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install postgresql-9.6

But get error:

sudo apt-get install postgresql-9.6

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package postgresql-9.6
E: Couldn't find any package by glob 'postgresql-9.6'
E: Couldn't find any package by regex 'postgresql-9.6'

After use advices in comments I get error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
postgresql-9.6 is already the newest version (9.6.24-3.pgdg22.04+1).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
uz flag
Jos
If `apt policy postgresql` doesn't turn up version 9.6, it is not available for your Ubuntu version and you will need to install a different PostgreSQL version.
in flag
If you need a very specific version of PostgreSQL, then your best option is to use a Docker container. This will give you the added benefit of not needing to worry about OS updates upgrading the database engine
Score:1
cn flag

You'll need to add the repos from Postgres as those versions are not in the Ubuntu repos.

First, import the GPG key.

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

Next, add the repo.

echo "deb http://apt.postgresql.org/pub/repos/apt/ jammy-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list

Then you should be able to install the versions you want.

sudo apt update
sudo apt install postgresql-9.6
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.