DEV Community

Lenny Lam
Lenny Lam

Posted on

6 1 1 1

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.

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

While many AI coding tools operate as simple command-response systems, Qodo Gen 1.0 represents the next generation: autonomous, multi-step problem-solving agents that work alongside you.

Read full post →

Top comments (3)

Collapse
 
brian_mason_40b4121042963 profile image
Brian Mason • Edited

After I added the line, 'apt-get update' no longer works. packages are download, but none are processed :/

Doh in 24 the command is 'apt update'

Collapse
 
lennylam profile image
Lenny Lam

Do you have any gpg keys on your server? Try sudo find / | grep *.gpg to see if there are any gpg keys on your server and where they are stored.

Which repo do you use?

Collapse
 
brian_mason_40b4121042963 profile image
Brian Mason

my bad 'apt update' works fine

thx for your reply

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs