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
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
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
Please write me a comment if the instructions helped you or not.
Top comments (0)