m-thirumal/installation_guide

"deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" does not work with PostgreSQL13

dkeeshin opened this issue · 0 comments

When trying to install postgreSQL 13 on Linux Mint 19.3:
VERSION_CODENAME=tricia
UBUNTU_CODENAME=bionic

This code:

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ lsb_release -cs-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

Generates this line in the file pgdg.list

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

Attempting to install, I get this error:

sudo apt install postgresql-13 postgresql-contrib-13
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package postgresql-13
E: Unable to locate package postgresql-contrib-13

Using the UBUNTU_CODENAME, instead of the VERSION_CODENAME works. Therefor the code above likely needs to be something like this:

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

Optionally, you could edit the pgdg.list file and add the appropriate UBUNTU_CODENAME value.

Dave Keeshin