The repository 'https://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease' is not signed - Error while installing Postgres14 in Ubuntu 22.04
0
votes
0
answers
274
views
I was trying to install PostgreSQL 14 database in Ubuntu 22.04 version as per the steps provided in the official Postgres site. But while updating the package list, I'm getting an error message. Could someone please help me to resolve this issue?
All the steps that I executed are given below:
root@abc02:~# sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
root@abc02:~# sudo apt install curl ca-certificates
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20230311ubuntu0.22.04.1).
curl is already the newest version (7.81.0-1ubuntu1.16).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@abc02:~# sudo install -d /usr/share/postgresql-common/pgdg
root@abc02:~# sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4812 100 4812 0 0 4221 0 0:00:01 0:00:01 --:--:-- 4224
root@abc02:~# sudo apt update
Get:1 https://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease [129 kB]
Err:1 https://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease
Unknown error executing apt-key
Reading package lists... Done
W: GPG error: https://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease: Unknown error executing apt-key
E: The repository 'https://apt.postgresql.org/pub/repos/apt jammy-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.
Additional details-
I can see contents in /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc
root@abc02:/usr/share/postgresql-common/pgdg# cat apt.postgresql.org.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBE6XR8IBEACVdDKT2HEH1IyHzXkb4nIWAY7echjRxo7MTcj4vbXAyBKOfjja UrBEJWHN6fjKJXOYWXHLIYg0hOGeW9qcSiaa1/rYIbOzjfGfhE4x0Y+NJHS1db0V
Asked by Kenny
(377 rep)
Dec 15, 2024, 11:47 AM