1

I am using Linux Mint Cinnamon 21.3 Virginia. I installed PostgreSQL recently and the installation proceeded successfully. However, there seems to be some issue with the package manager now. On running sudo apt-get update I get the following errors:

Err:9 https://apt.postgresql.org/pub/repos/apt virginia-pgdg Release           
  404  Not Found [IP: 147.75.85.69 443]

E: The repository 'https://apt.postgresql.org/pub/repos/apt virginia-pgdg Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Based on the answers on this StackOverflow question, I have tried the following:

  1. Change the URL of apt repository to apt-archive. To do this, I edited /etc/apt/sources.list.d/pgdg.list and changed deb https://apt-archive.postgresql.org/pub/repos/apt virginia-pgdg main to deb https://apt.postgresql.org/pub/repos/apt virginia-pgdg main. However, on doing so, I get a new error:
Err:12 https://apt-archive.postgresql.org/pub/repos/apt virginia-pgdg InRelease
  403  Forbidden [IP: 13.32.121.36 443]

E: Failed to fetch https://apt-archive.postgresql.org/pub/repos/apt/dists/virginia-pgdg/InRelease  403  Forbidden [IP: 13.32.121.36 443]
E: The repository 'https://apt-archive.postgresql.org/pub/repos/apt virginia-pgdg InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
  1. Installing the repository signing key from the PostgreSQL official Installation instructions. This doesn't solve anything.
  2. Changing the codename of my Linux Mint version to the Ubuntu version it is based on Linux Mint 21.3 is based off of Ubuntu 22.04 (Jammy Jellyfish), so I changed my /etc/apt/sources.list.d/pgdg/list to deb https://apt.postgresql.org/pub/repos/apt jammy-pgdg main. This throws a new warning:
Get:10 https://apt.postgresql.org/pub/repos/apt jammy-pgdg/main amd64 Packages [297 kB]

W: https://apt.postgresql.org/pub/repos/apt/dists/jammy-pgdg/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease' doesn't support architecture 'i386'

Since I am using an amd64 architecture, I am not worried about the architecture i386, for a 32-bit machine, not being supported. But how do I disable this warning every time I run the apt update command?

1 Answer 1

1

To set up the postgresql apt repository on Linux Mint Virginia based on jammy, use:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc |
sudo tee /usr/share/keyrings/pgdg.pgp
echo "deb [signed-by=/usr/share/keyrings/pgdg.pgp arch=amd64] https://apt.postgresql.org/pub/repos/apt jammy-pgdg main" |
sudo tee /etc/apt/sources.list.d/pgdg.list

For general use, to install postgresql on Linux Mint:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc |
sudo tee /usr/share/keyrings/pgdg.pgp
echo "deb [signed-by=/usr/share/keyrings/pgdg.pgp arch=amd64] https://apt.postgresql.org/pub/repos/apt $(. /etc/os-release && echo "$UBUNTU_CODENAME")-pgdg main" |
sudo tee /etc/apt/sources.list.d/pgdg.list

The . /etc/os-release && echo "$UBUNTU_CODENAME" will print the Ubuntu codename instead of lsb_release -cs.

Adding [arch=amd64] to disable the ...doesn't support architecture 'i386'... warning.

0

You must log in to answer this question.

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