DEV Community

Lenny Lam
Lenny Lam

Posted on

2

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.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

๐Ÿ‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay