gpg error during apt update and fail

Asked 1 years ago, Updated 1 years ago, 63 views

sudo apt update fails to update successfully with the following error:

$sudo apt update

...

Err:2 http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY CDFB5FA52007B954

...

Reading package lists... Done                            
W: GPG error: http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid InRelease: The following signatures could not be verified because the public key is not available: NO_PUBKEY CDFB5FA52007B954
E: The repository 'http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid InRelease' is not signed.
N: Updating from such a repository can't be done securely, and there is before disabled by default.
N—See apt-secure(8)manpage for repository creation and user configuration details.

I also tried to exclude http://downloads.metasploit.com/data/releases/metasploit-framework/apt from apt-purge, but this operation was also blocked by a gpg error.

 sudoppa-purgeppa: http://downloads.metasploit.com/data/releases/metasploit-framework/apt
Updating packages lists
W: GPG error: http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid InRelease: The following signatures could not be verified because the public key is not available: NO_PUBKEY CDFB5FA52007B954
E: The repository 'http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid InRelease' is not signed.
Warning: apt-get update failed for some reason

If there is a solution, please let me know.

There is no environment to try, so I just searched by keyword, but the following page may be helpful.

$sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys I tried doing this, but the following results resulted in an error:

$sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 

Executing: /tmp/apt-key-gphome.50 autdvTgt/gpg.1.sh --keyserver hkp://keys.gnupg.net --recv-keys CDFB5FA52007B954
gpg:key CDFB5FA52007B954:public key"Metasploit<[email protected]>"imported
gpg —Total number processed:1
gpg:imported:1
gpg:invalid key resource URL '/tmp/apt-key-gphome.50 autdvTgt/home:manuelschneid3r.asc.gpg'
gpg:keyblock resource '(null)':General error
gpg:key7721F63BD38B4796:2signatures not checked due to missing keys
gpg:key1488EB46E192A257:1 signature not checked due to a missing key
gpg:key3B4FE6ACC0B21F32:3 signatures not checked due to missing keys
gpg —key D94AA3F0EFE21092—3 signatures not checked due to missing keys
gpg:key871920D1991BC93C:1 signature not checked due to a missing key
gpg —Total number processed: 7
gpg:skipped new keys:7

The results of the sudo apt update failed with the same error content.

$cat/etc/lsb-release 
DISTRIB_ID = Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"

ubuntu apt gpg

2022-09-30 14:46

2 Answers

Livepatch>Other Software
to

http://downloads.metasploit.com/data/releases/metasploit-framework/apt

The error was resolved by deleting the items in .


2022-09-30 14:46

There is no environment to try, so I just searched by keyword, but the following page may be helpful.

GPG error when updating, key expired#7336

$sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys CDFB5FA52007B954


2022-09-30 14:46

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.