You are not logged in.

#1 2022-12-19 22:42:27

bradnag
Member
Registered: 2022-12-19
Posts: 5

[SOLVED] invalid or corrupted package (PGP signature) SOLVED

Hi Folks,

6.0.10-arch2-1

I updated regularly my packages but today I received a message about corrupted gpg signatures. I generated as directed:

pacman-key --init

and started pacman -Syu
after downloading and installing the packages I got a bunch of these (see below). If I delete them the pacman starts over again. I perhaps doing something wrong.

Do you want to delete it? [Y/n] n
error: xorg-xhost: signature from "Andreas Radke <andyrtr@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/xorg-xhost-1.0.9-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: xorg-xprop: signature from "Andreas Radke <andyrtr@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/xorg-xprop-1.2.6-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: xorg-xset: signature from "Andreas Radke <andyrtr@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/xorg-xset-1.2.5-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: xorg-xvinfo: signature from "Andreas Radke <andyrtr@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/xorg-xvinfo-1.1.5-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: xorg-xwayland: signature from "Andreas Radke <andyrtr@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/xorg-xwayland-22.1.7-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.

Last edited by bradnag (2022-12-20 21:07:10)

Offline

#2 2022-12-19 22:56:45

jonno2002
Member
Registered: 2016-11-21
Posts: 690

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

try:

pacman -S archlinux-keyring

then

pacman -Syu

this has worked for me when i get errors like that.

Offline

#3 2022-12-19 23:37:32

bradnag
Member
Registered: 2022-12-19
Posts: 5

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

jonno2002 wrote:

try:

pacman -S archlinux-keyring

then

pacman -Syu

this has worked for me when i get errors like that.

Oh yes, I think I had a similar issue on Manjaro and I did something like that. Thanks a lot I will try. I moved away some /var/cache/pacman/pkg and I am trying again right now pacman -Syu to build fresh cache.

Nope is not working this time:

error: archlinux-keyring: signature from "Christian Hesse <eworm@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/archlinux-keyring-20221213-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]

Started all over:

(114/114) checking keys in keyring                                  [#####################################] 100%
downloading required keys...
:: Import PGP key 139B09DA5BF0D338, "David Runge <dvzrv@archlinux.org>"? [Y/n] 
:: Import PGP key 6D42BDD116E0068F, "Christian Hesse <eworm@archlinux.org>"? [Y/n]

It seems they import the developer's PGP keys and then... delete them... because they are "corrupted".

Last edited by bradnag (2022-12-20 00:38:16)

Offline

#4 2022-12-20 02:07:37

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,953

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

I wonder if the pacman-key --init just made the problem worse. That initializes the keyring, but doesn't import or trust anything. I don't know if it will re-initilize a keyring that's already there, but if it does, that will screw a lot of things up. What directed you to run it? If it as gpg/pacman itself, that probably means your keyring got corrupted, likely by https://bugs.archlinux.org/task/76580

Offline

#5 2022-12-20 02:31:55

bradnag
Member
Registered: 2022-12-19
Posts: 5

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

Scimmia wrote:

I wonder if the pacman-key --init just made the problem worse. That initializes the keyring, but doesn't import or trust anything. I don't know if it will re-initilize a keyring that's already there, but if it does, that will screw a lot of things up. What directed you to run it? If it as gpg/pacman itself, that probably means your keyring got corrupted, likely by https://bugs.archlinux.org/task/76580

yes, pacman directed to do so

Offline

#6 2022-12-20 09:28:08

seth
Member
Registered: 2012-09-03
Posts: 57,030

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

Do you get away w/ "pacman-key --refresh-keys"?

Offline

#7 2022-12-20 13:01:01

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,953

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

refresh-keys won't do any good here.

bradnag, my apologies, I thought the bug report had mentioned the solution. Re-reading, it doesn't, so https://wiki.archlinux.org/title/Pacman … l_the_keys

Offline

#8 2022-12-20 17:57:42

bradnag
Member
Registered: 2022-12-19
Posts: 5

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

seth wrote:

Do you get away w/ "pacman-key --refresh-keys"?

yes, I did. Did not solve it.

Offline

#9 2022-12-20 18:02:50

bradnag
Member
Registered: 2022-12-19
Posts: 5

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

I noticed there was a UN-synchronized time, I corrected and then pacman worked just fine. I can't tell if this was the root cause but it looks like was related to it.

Thanks a lot folks.

Last edited by bradnag (2023-01-04 08:21:11)

Offline

#10 2022-12-31 19:12:25

pm3840
Member
Registered: 2013-12-16
Posts: 61

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

My machine hasn't been on for a while and I run into the same issue

[root@hp ~]# pacman -Q|grep ring
archlinux-keyring 20190123-2
libunistring 0.9.10-1
[root@hp ~]# pacman -S archlinux-keyring
resolving dependencies...
looking for conflicting packages...

Packages (1) archlinux-keyring-20221220-1

Total Installed Size:  1.60 MiB
Net Upgrade Size:      0.66 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                         [#######################################] 100%
downloading required keys...
error: key "6D42BDD116E0068F" could not be looked up remotely
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.
[root@hp ~]# date
Sat Dec 31 14:10:26 EST 2022
[root@hp ~]#

No luck following the wiki

Resetting all the keys

Remove or reset all the keys installed in your system by removing the /etc/pacman.d/gnupg directory (as root) and by rerunning pacman-key --init followed by pacman-key --populate to re-add the default keys.

505  mv /etc/pacman.d/gnupg /tmp
506  pacman-key --init
508  pacman -S archlinux-keyring

Last edited by pm3840 (2022-12-31 19:45:10)

Offline

#11 2022-12-31 21:38:48

seth
Member
Registered: 2012-09-03
Posts: 57,030

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

error: key "6D42BDD116E0068F" could not be looked up remotely
pacman-key -l 6D42BDD116E0068F
pacman-key --keyserver hkps://keyserver.ubuntu.com -l 6D42BDD116E0068F

https://wiki.archlinux.org/title/Pacman … _keyserver

Offline

#12 2022-12-31 23:45:24

pm3840
Member
Registered: 2013-12-16
Posts: 61

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

This HP has not been used in the last 2+ years. How to fix this?

[root@hp ~]# pacman-key -l 6D42BDD116E0068F
gpg: error reading key: No public key
==> ERROR: A specified key could not be listed.
[root@hp ~]# pacman-key --keyserver hkps://keyserver.ubuntu.com -l 6D42BDD116E0068F
gpg: error reading key: No public key
==> ERROR: A specified key could not be listed.
[root@hp ~]# 

my daily driver:

$ pacman-key -l 6D42BDD116E0068F
gpg: Note: trustdb not writable
pub   rsa2048 2011-08-12 [SC]
      02FD1C7A934E614545849F19A6234074498E9CEE
uid           [  full  ] Christian Hesse <eworm@archlinux.org>
uid           [  full  ] Christian Hesse (Arch Linux Package Signing) <arch@eworm.de>
sub   rsa2048 2011-08-12 [E]
sub   ed25519 2019-08-29 [S]
sub   cv25519 2019-08-29 [E]

$ pacman-key --keyserver hkps://keyserver.ubuntu.com -l 6D42BDD116E0068F
gpg: Note: trustdb not writable
pub   rsa2048 2011-08-12 [SC]
      02FD1C7A934E614545849F19A6234074498E9CEE
uid           [  full  ] Christian Hesse <eworm@archlinux.org>
uid           [  full  ] Christian Hesse (Arch Linux Package Signing) <arch@eworm.de>
sub   rsa2048 2011-08-12 [E]
sub   ed25519 2019-08-29 [S]
sub   cv25519 2019-08-29 [E]

Offline

#13 2022-12-31 23:50:15

pm3840
Member
Registered: 2013-12-16
Posts: 61

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

I guess this is solved by me exporting the key from my daily driver and import it on the `hp` machine.

Offline

#14 2022-12-31 23:51:55

pm3840
Member
Registered: 2013-12-16
Posts: 61

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

I guess this is solved by me exporting the key from my daily driver and importing it on the `hp` machine.

$ pacman-key -e 6D42BDD116E0068F > missingkey

# pacman-key -a missingkey

Offline

#15 2023-01-01 02:10:33

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,953

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

pm3840 wrote:

No luck following the wiki

Resetting all the keys

Remove or reset all the keys installed in your system by removing the /etc/pacman.d/gnupg directory (as root) and by rerunning pacman-key --init followed by pacman-key --populate to re-add the default keys.

505  mv /etc/pacman.d/gnupg /tmp
506  pacman-key --init
508  pacman -S archlinux-keyring

This didn't work because you skipped a step.

Offline

#16 2023-01-01 02:15:04

pm3840
Member
Registered: 2013-12-16
Posts: 61

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

Scimmia wrote:
pm3840 wrote:

No luck following the wiki

Resetting all the keys

Remove or reset all the keys installed in your system by removing the /etc/pacman.d/gnupg directory (as root) and by rerunning pacman-key --init followed by pacman-key --populate to re-add the default keys.

505  mv /etc/pacman.d/gnupg /tmp
506  pacman-key --init
508  pacman -S archlinux-keyring

This didn't work because you skipped a step.

Yeah you meant --populate. That was done in a separate terminal and it didn't help. But yeah I did miss that in the messages above.

Offline

#17 2024-08-27 04:49:44

noma
Member
Registered: 2024-08-27
Posts: 1

Re: [SOLVED] invalid or corrupted package (PGP signature) SOLVED

jonno2002 wrote:

try:

pacman -S archlinux-keyring

then

pacman -Syu

this has worked for me when i get errors like that.

Thanks so much, my issue is finally resolved

Offline

Board footer

Powered by FluxBB