How to solve Missing Signed-By in the sources.list(5) entry for Ubuntu after upgrading to Ubuntu 24.04

lennylam

Lenny Lam

Posted on November 23, 2024

How to solve Missing Signed-By in the sources.list(5) entry for Ubuntu after upgrading to Ubuntu 24.04

Image description

Problem

When apt update after an upgrade from Ubuntu 22.04 or an older version to version 24.02, the following error occurs: N: Missing Signed-By in the sources.list(5) entry for. After the first analysis, the authenticity of the package cannot be verified.

Solution

This is because the GPG key for verifying the packages has not been stored correctly. To solve the problem, go to the folder where the sources for fetching are stored, which would normally be: /etc/apt/sources.list.d.

cd /etc/apt/sources.list.d
Enter fullscreen mode Exit fullscreen mode

Then you can list the files that are inside with ls -l.

Go to one of the following files:
third-party.sources or ubuntu.sources (depending on which provider you are with, they may have a different name and look)

They should look something like this:

Types: deb
URIs: http://security.ubuntu.com/ubuntu
Suites: focal-security
Components: main restricted

Types: deb
URIs: http://security.ubuntu.com/ubuntu
Suites: noble-security
Components: main restricted universe multiverse
Enter fullscreen mode Exit fullscreen mode

To prevent the error from happening again, you should edit the file, for example with Nano, and add the following line Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg:

Types: deb
URIs: http://security.ubuntu.com/ubuntu
Suites: focal-security
Components: main restricted
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
Enter fullscreen mode Exit fullscreen mode

Please write me a comment if the instructions helped you or not.

πŸ’– πŸ’ͺ πŸ™… 🚩
lennylam
Lenny Lam

Posted on November 23, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related