32

Hope you are doing well. The problem started to show up after I upgraded Ubuntu 23.10 ---> Ubuntu 24.04 LTS (through the Gnome Software Updater).

Here is the output of the sudo apt update -y command:

$ sudo apt update -y
Hit:1 https://archive.ubuntu.petiak.ir/ubuntu noble InRelease
Hit:2 https://archive.ubuntu.petiak.ir/ubuntu noble-updates InRelease
Hit:3 https://archive.ubuntu.petiak.ir/ubuntu noble-backports InRelease
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
19 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://dl.google.com/linux/chrome/deb stable InRelease' doesn't support architecture 'i386'
N: Missing Signed-By in the sources.list(5) entry for 'https://archive.ubuntu.petiak.ir/ubuntu'
N: Missing Signed-By in the sources.list(5) entry for 'https://archive.ubuntu.petiak.ir/ubuntu'
N: Missing Signed-By in the sources.list(5) entry for 'https://archive.ubuntu.petiak.ir/ubuntu'

Disorder parts:

N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://dl.google.com/linux/chrome/deb stable InRelease' doesn't support architecture 'i386'
N: Missing Signed-By in the sources.list(5) entry for 'https://archive.ubuntu.petiak.ir/ubuntu'
N: Missing Signed-By in the sources.list(5) entry for 'https://archive.ubuntu.petiak.ir/ubuntu'
N: Missing Signed-By in the sources.list(5) entry for 'https://archive.ubuntu.petiak.ir/ubuntu'
Toghrol
  • 443
  • Landed here while doing the same from a Digital Ocean droplet. My issue is slightly different because the mirror is maintained by Digital Ocean and I have no idea how to fix it. https://www.digitalocean.com/community/questions/n-missing-signed-by-in-the-sources-list-5-entry-for-http-mirrors-digitalocean-com-ubuntu – Wes Souza Jun 11 '24 at 23:03
  • It's only a "notice" (N:), so not urgent. – Simon Richter Aug 23 '24 at 08:15

9 Answers9

17

Taking the hint from https://www.digitalocean.com/community/questions/n-missing-signed-by-in-the-sources-list-5-entry-for-http-mirrors-digitalocean-com-ubuntu I added:

Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

To each entry in my /etc/apt/sources.list.d/ file, that being for gb.archive.ubuntu.com and security.ubuntu.com in my case. That's fixed the error and all sources are now downloaded and verified.

I assume I ran into this due to it being an old, upgraded multiple times, install, including that I probably hand-adjusted the sources file at some point. It was still the old "just a single line per source" style before this upgrade from LTS 22, through 23, to LTS 24.

  • For Pop!_OS 24.04 alpha I added that to system.sources and added Signed-By: /usr/share/keyrings/pop-archive-keyring.gpg to pop-os-apps.sourcesand pop-os-release.sources – HarlemSquirrel Sep 18 '24 at 13:24
  • I had to do the same in /etc/apt/sources.list.d/third-party.sources for my Contabo server, adding the Signed-By lines which were missing. – LinkPhoenix Dec 08 '24 at 02:32
  • This didn't help me. I got errors starting with:

    Err:7 https://esm.ubuntu.com/apps/ubuntu noble-apps-security InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AB01A101DB53907B

    – Marc Sep 12 '25 at 08:35
11

In my case what helped is removing the country prefix from /etc/apt/sources.list.d/ubuntu.sources.

So it was before

[…]
URIs: http://ru.archive.ubuntu.com/ubuntu/
[…]

and then it became:

[…]
URIs: http://archive.ubuntu.com/ubuntu/
[…]

I am not exactly sure what's causing it (perhaps some missing key?), but it's clearly some misconfiguration on the Ubuntu 24.04 installer side.

Hi-Angel
  • 4,915
  • 1
    Not worked here... Example of file:

    Types: deb deb-src URIs: http://br.archive.ubuntu.com/ubuntu Suites: noble noble-updates noble-backports Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

    just removing the br didn't make it work

    – Enderson Menezes Nov 01 '24 at 19:48
3

Ran into this myself yesterday. I solved the issue as follows:

  • I'm in New Zealand, so I use http://nz.archive.ubuntu.com/ubuntu, not the more generic http://archive.ubuntu.com/ubuntu. For some reason, the update to 24.04 re-set the URLs to the generic, non-regional URL. Prefixing nz. to all URLs in all files named archive_uri-http_archive_ubuntu_com_ubuntu-* in /etc/apt/sourced.d.list/ got me a step further.
  • I copied the Signed-By: line mentioned in /etc/apt/sources.list.d/ubuntu.sources to all archive_uri-http_archive_ubuntu_com_ubuntu-* files in the same directory. This works, because the URL in ubuntu.sources is the regional nz.archive.ubuntu.com I now copy-pasted to all the archive_* files in the previous steps.
  • Running sudo apt update then gave me a bunch of warnings, similar to
W: Target CNF (universe/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/archive_uri-http_archive_ubuntu_com_ubuntu-impish.sources:1 and /etc/apt/sources.list.d/ubuntu.sources:1
  • Checking the offending file archive_uri-http_archive_ubuntu_com_ubuntu-impish.sources showed that it was indeed basically a duplicate of the contents of ubuntu.sources, so I moved it out of the way (sudo mv archive_uri-http_archive_ubuntu_com_ubuntu-impish.sources ~/)

After all this, I could run sudo apt update without errors/warnings.

I'm not 100% sure what the URL should be in your case. Have a look what's there in ubuntu.sources. It could be worth looking for a faster one on the mirror list. Looking under Iran I'd think that Saba Abr Mizban or Tegra host should be much faster than the one you're currently using.

Rody Oldenhuis
  • 272
  • 1
  • 2
  • 9
0
  1. Find sources that contain us.archive.ubuntu.com

    grep -r "us.archive.ubuntu.com" /etc/apt/
    /etc/apt/sources.list.d/us_archive_ubuntu_com_ubuntu.sources:URIs: http://us.archive.ubuntu.com/ubuntu
    /etc/apt/sources.list.d/us_archive_ubuntu_com_ubuntu.list.save:deb http://us.archive.ubuntu.com/ubuntu focal multiverse
    /etc/apt/sources.list.d/us_archive_ubuntu_com_ubuntu.list.distUpgrade:deb http://us.archive.ubuntu.com/ubuntu noble multiverse
    
  2. Edit us_archive_ubuntu_com_ubuntu.sources file by adding Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg to the end of the file.

    sudo vim /etc/apt/sources.list.d/us_archive_ubuntu_com_ubuntu.sources
    Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
    

NOTE: I edited only one file, not all!

0

For serverloft.eu urls, my /etc/apt/sources.list.d/third-party.sources file now looks like this, after simply adding the last line, and now the warnings are gone:

Types: deb deb-src
URIs: http://ubuntu.mirror.serverloft.eu/ubuntu
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
0

For aliyun mirror, I add the following line to the end of third-party.sources to fix this problem. But I wonder if I should ask for the GPG from Aliyun mirror site?

cat third-party.sources

Types: deb deb-src
URIs: http://mirrors.aliyuncs.com/ubuntu/
Suites: noble noble-updates noble-security noble-backports noble-proposed
Components: main restricted universe multiverse
Signed-by: /usr/share/keyrings/ubuntu-archive-keyring.gpg
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. – Community Oct 11 '24 at 18:22
0

UBUNTU 24.04.1 After Install (UEFI) =

sudo nano /etc/apt/sources.list

copy paste this =

deb http://archive.ubuntu.com/ubuntu/ noble main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ noble-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse

Control X for exit, Y for Yes to save, enter, now =

sudo apt update

ISRAEL
  • 89
  • I do not understand why manual editing of the files fixes the problem. Could you add more info what does that means and where you take this approach? – Default Writer Feb 01 '25 at 15:24
0

You can switch from local to US, run command as usual sudo apt update -y from terminal and that will fix this error. No hand made modifications are required.

Software & Updates

Before:

enter image description here

After:

enter image description here

0

in my case this happened as i used a cloud image, for some reason they have "cloud.archive" in from of the URI, i removed that and WOILA. That archive image is where the config bug is.