Subject: manual repository set up for ubuntu 24.04 'noble' fails certificate

From: Bernard Baillargeon <[email-masked]>
Date: Sun, 28 Jul 2024 02:01:41 -0500

I want to install postgreSQL *16*, so I walked through the very good
instructions carefully, but on "sudo apt update" system gave this error:

bern:~$ *sudo apt update*
*E: Conflicting values set for option Signed-By *regarding *source*
https://apt.postgresql.org/pub/repos/*apt**/_*noble-pgdg:
 /usr/share/postgresql-common/pgdg/*apt.postgresql.org.asc* *!=*
/usr/share/postgresql-common/pgdg/*apt.postgresql.org.gpg*
E: The list of sources could not be read.

the file created:
/etc/apt/sources.list.d/*pgdg.list:*
deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc]
https://apt.postgresql.org/pub/repos/*apt_noble*-pgdg main

Is that trailing red slash in the error message hinting sys is trying to
read .../apt*/*noble-pgdg even though it does show the space(_) after */*_?
Or is the *gpg* file out of sync w certificate?

*Bernard (Bern) Baillargeon*

---

From: Bernard Baillargeon <[email-masked]>
Date: Sun, 28 Jul 2024 02:16:02 -0500

and I just checked the site certificate- created in '17, expired in '19;
maybe this is the issue?
*Bernard (Bernie) Baillargeon*

---

From: Bernard Baillargeon <[email-masked]>
Date: Sun, 28 Jul 2024 19:59:30 -0500

This error is something I cannot find a way around -it fails anything now
in APT!:
bern:~$ sudo apt list
E: Conflicting values set for option Signed-By regarding source
https://apt.postgresql.org/pub/repos/apt/ noble-pgdg:
/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc !=
/usr/share/postgresql-common/pgdg/apt.postgresql.org.gpg
E: The list of sources could not be read.
*Bernard (Bernie) Baillargeon*

On Sun, Jul 28, 2024 at 2:16 AM Bernard Baillargeon <[email-masked]>
wrote:

> On Sun, Jul 28, 2024 at 2:01 AM Bernard Baillargeon <
> [email-masked]> wrote:
>

---

From: Christoph Berg <[email-masked]>
Date: Mon, 29 Jul 2024 17:44:39 +0300

Re: Bernard Baillargeon
> E: The list of sources could not be read.

Perhaps you could show the actual files from /etc/apt/sources.list and
/etc/apt/sources.list.d/* .

Christoph

---

From: Bernard Baillargeon <[email-masked]>
Date: Mon, 29 Jul 2024 17:41:54 -0500

/etc/apt/sources.list  says "everything is in sources.list.d/"
which has:
-rw-r--r-- 1 root root  138 Jul 28 19:37  pgdg.list
-rw-r--r-- 1 root root  165 Jul 28 16:45 pgdg.sources
-rw-r--r-- 1 root root  202 Jun 16 00:03 ubuntu-esm-apps.sources
-rw-r--r-- 1 root root  206 Jun 16 00:03 ubuntu-esm-infra.sources
-rw-r--r-- 1 root root  386 Jun 15 23:43 ubuntu.sources
-rw-r--r-- 1 root root 2552 Apr 24 05:51 ubuntu.sources.curtin.orig
---------------
and since I'm here, I'm looking into ea. to list their content:
pgdg.list:
deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc]
https://apt.postgresql.org/pub/repos/apt noble-pgdg main deb-src
-----
*pgdg.sources:*
Types: deb
URIs: https://apt.postgresql.org/pub/repos/apt
Suites: noble-pgdg
Components: main 16
Signed-By: /usr/share/postgresql-common/pgdg/apt.postgresql.org.gpg
-----
*ubuntu-esm-apps.sources:*
# Written by ubuntu-pro-client
Types: deb
URIs: https://esm.ubuntu.com/apps/ubuntu
Suites: noble-apps-security noble-apps-updates
Components: main
Signed-By: /usr/share/keyrings/ubuntu-pro-esm-apps.gpg
-----
*ubuntu-esm-infra.sources:*
# Written by ubuntu-pro-client
Types: deb
URIs: https://esm.ubuntu.com/infra/ubuntu
Suites: noble-infra-security noble-infra-updates
Components: main
Signed-By: /usr/share/keyrings/ubuntu-pro-esm-infra.gpg
-----
*ubuntu.sources:*
Types: deb
URIs: http://us.archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
-----
*ubuntu.sources.curtin.orig:*
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

## Ubuntu distribution repository
##
## The following settings can be adjusted to configure which packages to
use from Ubuntu.
## Mirror your choices (except for URIs and Suites) in the security section
below to
## ensure timely security updates.
##
## Types: Append deb-src to enable the fetching of source package.
## URIs: A URL to the repository (you may add multiple URLs)
## Suites: The following additional suites can be configured
##   <name>-updates   - Major bug fix updates produced after the final
release of the
##                      distribution.
##   <name>-backports - software from this repository may not have been
tested as
##                      extensively as that contained in the main release,
although it includes
##                      newer versions of some applications which may
provide useful features.
##                      Also, please note that software in backports WILL
NOT receive any review
##                      or updates from the Ubuntu security team.
## Components: Aside from main, the following components can be added to
the list
##   restricted  - Software that may not be under a free license, or
protected by patents.
##   universe    - Community maintained packages. Software in this
repository receives maintenance
##                 from volunteers in the Ubuntu community, or a 10 year
security maintenance
##                 commitment from Canonical when an Ubuntu Pro
subscription is attached.
##   multiverse  - Community maintained of restricted. Software from this
repository is
##                 ENTIRELY UNSUPPORTED by the Ubuntu team, and may not be
under a free
##                 licence. Please satisfy yourself as to your rights to
use the software.
##                 Also, please note that software in multiverse WILL NOT
receive any
##                 review or updates from the Ubuntu security team.
##
## See the sources.list(5) manual page for further settings.
Types: deb
URIs: http://archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

## Ubuntu security updates. Aside from URIs and Suites,
## this should mirror your choices in the previous section.
Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
-----
*Bernard (Bernie) Baillargeon*

---

From: Bernard Baillargeon <[email-masked]>
Date: Mon, 29 Jul 2024 17:49:57 -0500

also, the last entry, the script, though nothing in the left column
distinguished it as unique, had a greyed color, and internally referenced
the directory for keyrings, */usr/share/keyrings * for several files;
content of keyrings dir:

-rw-r--r--   1 root root  3607 Nov 25  2023 ubuntu-archive-keyring.gpg
-rw-r--r--   1 root root  1227 Nov 25  2023 ubuntu-archive-removed-keys.gpg
-rw-r--r--   1 root root  2444 Nov 25  2023 ubuntu-cloudimage-keyring.gpg
-rw-r--r--   1 root root     0 Nov 25  2023
ubuntu-cloudimage-removed-keys.gpg
-rw-r--r--   1 root root  1191 Nov 25  2023 ubuntu-master-keyring.gpg
-rw-r--r--   1 root root  1150 Apr 30 15:35 ubuntu-pro-anbox-cloud.gpg
-rw-r--r--   1 root root  2247 Apr 30 15:35 ubuntu-pro-cc-eal.gpg
-rw-r--r--   1 root root  2274 Apr 30 15:35 ubuntu-pro-cis.gpg
-rw-r--r--   1 root root  2236 Apr 30 15:35 ubuntu-pro-esm-apps.gpg
-rw-r--r--   1 root root  2264 Apr 30 15:35 ubuntu-pro-esm-infra.gpg
-rw-r--r--   1 root root  2275 Apr 30 15:35 ubuntu-pro-fips.gpg
-rw-r--r--   1 root root  2275 Apr 30 15:35 ubuntu-pro-fips-preview.gpg
-rw-r--r--   1 root root  2250 Apr 30 15:35 ubuntu-pro-realtime-kernel.gpg
-rw-r--r--   1 root root  2235 Apr 30 15:35 ubuntu-pro-ros.gpg

---

From: Christoph Berg <[email-masked]>
Date: Tue, 30 Jul 2024 15:06:12 +0300

You have the repository configured twice. Remove one of the pgdg.* files. 

Christoph