W: GPG error: http://us.archive.ubuntu.com/ubuntu precise-backports InRelease: The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5

Asked by Praveen Kumar Selvam on 2020-06-27

Hello Everyone,

I have a problem in ubuntu 20.04 repository updates. I have a problem in sudo apt-get update. I have tried many menthods mentioned in Internet, but nothing worked for me.
I think after installing metasploit, I got this error. But anyway I have removed metasploit.

Hit:1 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Ign:3 http://archive.canonical.com/ubuntu precise InRelease
Hit:4 http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid InRelease
Ign:5 http://extras.ubuntu.com/ubuntu precise InRelease
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:7 http://us.archive.ubuntu.com/ubuntu precise InRelease
Hit:8 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Get:9 http://archive.canonical.com/ubuntu precise Release [8,180 B]
Get:10 http://extras.ubuntu.com/ubuntu precise Release [11.9 kB]
Hit:11 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:12 http://extras.ubuntu.com/ubuntu precise Release.gpg [72 B]
Get:13 http://archive.canonical.com/ubuntu precise Release.gpg [181 B]
Ign:12 http://extras.ubuntu.com/ubuntu precise Release.gpg
Ign:13 http://archive.canonical.com/ubuntu precise Release.gpg
Get:14 http://us.archive.ubuntu.com/ubuntu precise Release [49.6 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu precise-security InRelease [55.7 kB]
Err:15 http://us.archive.ubuntu.com/ubuntu precise-security InRelease
  The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
Get:16 http://us.archive.ubuntu.com/ubuntu precise-updates InRelease [55.7 kB]
Err:16 http://us.archive.ubuntu.com/ubuntu precise-updates InRelease
  The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
Get:17 http://us.archive.ubuntu.com/ubuntu precise-backports InRelease [55.7 kB]
Err:17 http://us.archive.ubuntu.com/ubuntu precise-backports InRelease
  The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
Get:18 http://us.archive.ubuntu.com/ubuntu precise Release.gpg [198 B]
Ign:18 http://us.archive.ubuntu.com/ubuntu precise Release.gpg
Reading package lists... Done
W: GPG error: http://extras.ubuntu.com/ubuntu precise Release: Detached signature file '/var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_precise_Release.gpg' is in unsupported binary format
E: The repository 'http://extras.ubuntu.com/ubuntu precise Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.canonical.com/ubuntu precise Release: The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http://archive.canonical.com/ubuntu precise Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://us.archive.ubuntu.com/ubuntu precise-security InRelease: The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http://us.archive.ubuntu.com/ubuntu precise-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://us.archive.ubuntu.com/ubuntu precise-updates InRelease: The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http://us.archive.ubuntu.com/ubuntu precise-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://us.archive.ubuntu.com/ubuntu precise-backports InRelease: The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http://us.archive.ubuntu.com/ubuntu precise-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://us.archive.ubuntu.com/ubuntu precise Release: The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http://us.archive.ubuntu.com/ubuntu precise Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I request you to, Kindly help me in this case. Thank you in advance.

With regards,
Praveen Kumar Selvam

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
2020-06-28
Last query:
2020-06-28
Last reply:
2020-06-28
Kai Kasurinen (kai-kasurinen) said : #1

Why you have Ubuntu 12.04 precise sources?

"Precise key 40976EAF437D05B5 was moved into /usr/share/keyrings/ubuntu-archive-removed-keys.gpg since ubuntu-keyring >= 2016.10.27"

https://bugs.launchpad.net/ubuntu/+source/debootstrap/+bug/1851459
https://bugs.launchpad.net/ubuntu/+source/ubuntu-keyring/+bug/1363482

If you are using Focal then I suggest you remove the sources for Precise in your apt settings

How can I remove precise in my apt settings

This is my sources.list file. I need to remove precise and add Focal

/etc/apt$ cat sources.list
#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu precise partner
deb-src http://archive.canonical.com/ubuntu precise partner

###### Ubuntu Extras Repo
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
deb http://archive.ubuntu.com/ubuntu focal main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse

All instances of "precise" in /etc/apt/sources.list or in the files in /etc/apt/sources.list.d change them to "focal" then run:

sudo apt update

I cant able to rewrite in sources.list, Becuase it is a read-only file. Can you please explain me, how can I change them to focal.

Run:

sudoedit filename

And you will get read access. The files are owned by root.

The same already I have got, i can able to read, but I cant able to change or edit in sources.list, you can see above my sources.list file

Run:

sudoedit /etc/apt/sources.list

Type your user's password to authenticate and you will have write access

I have edited by using nano sources.list,
And changed as focal in every place of precise, but still I cant do sudo apt-get update
still its showing precise as a repository

Did you edit the files in /etc/apt/sources.list.d as well. They may have precise in them too

After editing in sources.list, sources.list.d, sources.list.save, sources.list.d.save as focal in place of precise, I still get an error.

apt-get update
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [107 kB]
Get:2 http://archive.canonical.com/ubuntu focal InRelease [12.1 kB]
Get:3 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal InRelease [18.0 kB]
Err:2 http://archive.canonical.com/ubuntu focal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
Ign:4 http://extras.ubuntu.com/ubuntu focal InRelease
Err:3 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EFC71127F425E228
Get:5 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Err:6 http://extras.ubuntu.com/ubuntu focal Release
  404 Not Found [IP: 2001:67c:1560:8001::29 80]
Err:1 http://security.ubuntu.com/ubuntu focal-security InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
Get:7 http://us.archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Err:5 http://archive.ubuntu.com/ubuntu focal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
Get:8 http://archive.ubuntu.com/ubuntu focal-updates InRelease [107 kB]
Err:8 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
Get:9 http://archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]
Err:9 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
Err:7 http://us.archive.ubuntu.com/ubuntu focal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
Get:10 http://us.archive.ubuntu.com/ubuntu focal-security InRelease [107 kB]
Err:10 http://us.archive.ubuntu.com/ubuntu focal-security InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
Get:11 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [107 kB]
Err:11 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
Get:12 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]
Err:12 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
Reading package lists... Done
W: GPG error: http://archive.canonical.com/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
E: The repository 'http://archive.canonical.com/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EFC71127F425E228
E: The repository 'http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://extras.ubuntu.com/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://security.ubuntu.com/ubuntu focal-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
E: The repository 'http://security.ubuntu.com/ubuntu focal-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
E: The repository 'http://archive.ubuntu.com/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu focal-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
E: The repository 'http://archive.ubuntu.com/ubuntu focal-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu focal-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
E: The repository 'http://archive.ubuntu.com/ubuntu focal-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://us.archive.ubuntu.com/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://us.archive.ubuntu.com/ubuntu focal-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://us.archive.ubuntu.com/ubuntu focal-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://us.archive.ubuntu.com/ubuntu focal-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

sudo gpg --keyserver pgpkeys.mit.edu --recv-key 3B4FE6ACC0B21F32
sudo gpg -a --export 3B4FE6ACC0B21F32 | sudo apt-key add -
sudo gpg --keyserver pgpkeys.mit.edu --recv-key 871920D1991BC93C
sudo gpg -a --export 871920D1991BC93C | sudo apt-key add -
sudo apt-get update

Should do it

Mr. andrew,
Its not working!

sudo gpg --keyserver pgpkeys.mit.edu --recv-key 3B4FE6ACC0B21F32
gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: keyserver receive failed: No keyserver available

I just added the keyserver, still I get error

apt-get update
Hit:1 http://archive.canonical.com/ubuntu focal InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu focal-security InRelease
Ign:4 http://extras.ubuntu.com/ubuntu focal InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal InRelease
Get:6 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal InRelease [18.0 kB]
Hit:7 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Err:9 http://extras.ubuntu.com/ubuntu focal Release
  404 Not Found [IP: 2001:67c:1560:8001::29 80]
Hit:10 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:11 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:12 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:13 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal/main Sources [1,008 B]
Get:14 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal/main amd64 Packages [916 B]
Get:15 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal/main Translation-en [160 B]
Reading package lists... Done
E: The repository 'http://extras.ubuntu.com/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

OK remove the "extras" source and you should be OK

yes, I have removed. Thank you Mr.andrew for resolving my issue.

Thanks actionparsnip, that solved my question.