You are not logged in.

#1 2023-07-31 07:18:36

Nika0
Member
Registered: 2023-07-31
Posts: 9

[SOLVED] Cannot upgrade packages due to few corrupt/invalid packages

I've been having this error for a while and looking for fixes online (e.g. rm -r /var/lib/pacman/sync/ or renewing the keyring) didn't solve the issue.

:: Retrieving packages...
 electron25-25.3.2-1-x86_64                                                                60.5 MiB   239 KiB/s 04:19 [######################################################################] 100%
 electron22-22.3.18-1-x86_64                                                               58.2 MiB   239 KiB/s 04:10 [######################################################################] 100%
 node-gyp-9.4.0-1-any                                                                    1246.0 KiB   238 KiB/s 00:05 [######################################################################] 100%
 python-regex-2023.6.3-1-x86_64                                                           383.1 KiB   237 KiB/s 00:02 [######################################################################] 100%
 electron-1:25-1-any                                                                        3.6 KiB   107 KiB/s 00:00 [######################################################################] 100%
 Total (5/5)                                                                              120.3 MiB   239 KiB/s 08:36 [######################################################################] 100%
(678/678) checking keys in keyring                                                                                    [######################################################################] 100%
(678/678) checking package integrity                                                                                  [######################################################################] 100%
error: electron22: signature from "Caleb Maclennan <alerque@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/electron22-22.3.18-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: electron25: signature from "Caleb Maclennan <alerque@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/electron25-25.3.2-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: electron: signature from "Caleb Maclennan <alerque@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/electron-1:25-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: node-gyp: signature from "Caleb Maclennan <alerque@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/node-gyp-9.4.0-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: python-regex: signature from "Caleb Maclennan <alerque@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/python-regex-2023.6.3-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.
 -> error installing repo packages

I delete them, try again and it still comes back. Thank you for your help.

Last edited by Nika0 (2023-08-02 11:42:15)

Offline

#2 2023-07-31 07:29:06

Nika0
Member
Registered: 2023-07-31
Posts: 9

Re: [SOLVED] Cannot upgrade packages due to few corrupt/invalid packages

What I tried so far (not in exact order of operation):

  • # pacman-key --init && pacman-key --populate archlinux
  • # gpg --refresh-keys
  • $ sudo rm -R /root/.gnupg/
  • $ sudo rm -R /etc/pacman.d/gnupg/
  • $ sudo rm -r /var/lib/pacman/sync/
  • $ sudo pacman -Sy archlinux-keyring

Offline

#3 2023-07-31 07:53:31

seth
Member
Registered: 2012-09-03
Posts: 59,999

Re: [SOLVED] Cannot upgrade packages due to few corrupt/invalid packages

After "sudo rm -R /etc/pacman.d/gnupg/" you'll have to "pacman-key --init && pacman-key --populate", pay attention to any error messages.
Then check "pacman-key -l alerque@archlinux.org"

Offline

#4 2023-07-31 08:22:19

Nika0
Member
Registered: 2023-07-31
Posts: 9

Re: [SOLVED] Cannot upgrade packages due to few corrupt/invalid packages

seth wrote:

After "sudo rm -R /etc/pacman.d/gnupg/" you'll have to "pacman-key --init && pacman-key --populate" (...)

Input:

$ sudo rm -R /etc/pacman.d/gnupg/
$ sudo -s
# pacman-key --init && pacman-key --populate

Output of the last command:

gpg: /etc/pacman.d/gnupg/trustdb.gpg: trustdb created
gpg: no ultimately trusted keys found
gpg: starting migration from earlier GnuPG versions
gpg: porting secret keys from '/etc/pacman.d/gnupg/secring.gpg' to gpg-agent
gpg: migration succeeded
==> Generating pacman master key. This may take some time.
gpg: Generating pacman keyring master key...
gpg: directory '/etc/pacman.d/gnupg/openpgp-revocs.d' created
gpg: revocation certificate stored as '/etc/pacman.d/gnupg/openpgp-revocs.d/FFEB2467A025C0ADD5412B2BC5630625D5B4B1D3.rev'
gpg: Done
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
==> Appending keys from archlinux.gpg...
==> Locally signing trusted keys in keyring...
  -> Locally signed 5 keys.
==> Importing owner trust values...
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: inserting ownertrust of 4
gpg: setting ownertrust to 4
==> Disabling revoked keys in keyring...
  -> Disabled 33 keys.
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   5  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:   5  signed:  95  trust: 0-, 0q, 0n, 5m, 0f, 0u
gpg: depth: 2  valid:  72  signed:  27  trust: 72-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2023-08-02
seth wrote:

Then check "pacman-key -l alerque@archlinux.org"

Input:

# pacman-key -l alerque@archlinux.org

Output:

pub   ed25519 2021-07-12 [SC] [expired: 2023-07-12]
      CCB34EBBB9541EF3F7B366C1D4A753468A5A5B67
uid           [ expired] Caleb Maclennan <alerque@archlinux.org>

Offline

#5 2023-07-31 08:25:26

Nika0
Member
Registered: 2023-07-31
Posts: 9

Re: [SOLVED] Cannot upgrade packages due to few corrupt/invalid packages

uid           [ expired] Caleb Maclennan <alerque@archlinux.org>

Apparently that key is expired.

Offline

#6 2023-07-31 11:17:27

Nika0
Member
Registered: 2023-07-31
Posts: 9

Re: [SOLVED] Cannot upgrade packages due to few corrupt/invalid packages

I still do need help though, I'm not great at this.

Offline

#7 2023-07-31 11:28:23

seth
Member
Registered: 2012-09-03
Posts: 59,999

Re: [SOLVED] Cannot upgrade packages due to few corrupt/invalid packages

Please don't bump.
This isn't some help desk, other users are gonna respond when they find the time to spare.

You don't have any sub key for caleb?
https://gitlab.archlinux.org/archlinux/ … acb9d29f47

pacman -Qikk archlinux-keyring
sudo pacman -Sy archlinux-keyring
pacman-key -l alerque@archlinux.org

Offline

#8 2023-08-02 11:40:37

Nika0
Member
Registered: 2023-07-31
Posts: 9

Re: [SOLVED] Cannot upgrade packages due to few corrupt/invalid packages

I'm sorry.

Running

# pacman -Qikk archlinux-keyring
Name            : archlinux-keyring
Version         : 20230504-1
Description     : Arch Linux PGP keyring
Architecture    : any
URL             : https://gitlab.archlinux.org/archlinux/archlinux-keyring/
Licenses        : GPL3
Groups          : None
Provides        : None
Depends On      : pacman
Optional Deps   : None
Required By     : base  base-devel
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 1649.18 KiB
Packager        : Christian Hesse <eworm@archlinux.org>
Build Date      : Thu 04 May 2023 11:10:24 AM CEST
Install Date    : Tue 09 May 2023 09:47:03 AM CEST
Install Reason  : Installed as a dependency for another package
Install Script  : Yes
Validated By    : Signature

archlinux-keyring: 17 total files, 0 altered files

Running

# pacman -Sy archlinux-keyring
Packages (1) archlinux-keyring-20230704-1

Total Installed Size:  1.62 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                                                                        [######################################################################] 100%
(1/1) checking package integrity                                                                                      [######################################################################] 100%
(1/1) loading package files                                                                                           [######################################################################] 100%
(1/1) checking for file conflicts                                                                                     [######################################################################] 100%
(1/1) checking available disk space                                                                                   [######################################################################] 100%
:: Processing package changes...
(1/1) upgrading archlinux-keyring                                                                                     [######################################################################] 100%
==> Appending keys from archlinux.gpg...
==> Disabling revoked keys in keyring...
  -> Disabled 3 keys.
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   5  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:   5  signed:  95  trust: 0-, 0q, 0n, 5m, 0f, 0u
gpg: depth: 2  valid:  73  signed:  27  trust: 73-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2023-10-27
==> Updating trust database...
gpg: next trustdb check due at 2023-10-27
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...
(2/2) Arming ConditionNeedsUpdate...

Running

# pacman -Qikk archlinux-keyring

again:

Name            : archlinux-keyring
Version         : 20230704-1
Description     : Arch Linux PGP keyring
Architecture    : any
URL             : https://gitlab.archlinux.org/archlinux/archlinux-keyring/
Licenses        : GPL3
Groups          : None
Provides        : None
Depends On      : pacman
Optional Deps   : None
Required By     : base  base-devel
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 1654.19 KiB
Packager        : Christian Hesse <eworm@archlinux.org>
Build Date      : Tue 04 Jul 2023 09:48:33 AM CEST
Install Date    : Mon 31 Jul 2023 01:36:17 PM CEST
Install Reason  : Installed as a dependency for another package
Install Script  : Yes
Validated By    : Signature

archlinux-keyring: 17 total files, 0 altered files

Running

# pacman-key -l alerque@archlinux.org
pub   ed25519 2021-07-12 [SC] [expires: 2024-08-11]
      CCB34EBBB9541EF3F7B366C1D4A753468A5A5B67
uid           [  full  ] Caleb Maclennan <alerque@archlinux.org>
sub   rsa4096 2021-07-12 [S] [expires: 2024-08-11]
sub   cv25519 2021-07-12 [E] [expires: 2024-08-11]

It appears as the key is now up to date.

I ran yay and it gave me an error that there were some files already present in /usr/lib/node_modules/npm/ I think so I have rm -R it and it proceeded with upgrade as normal.

Thank you for your assistance seth and I'm sorry once again for bumping.

Offline

#9 2023-08-09 11:31:42

BlankSaint
Member
Registered: 2023-08-09
Posts: 1

Re: [SOLVED] Cannot upgrade packages due to few corrupt/invalid packages

Hey saw this post on Unanswered and says [SOLVED] so I didn't know if this has been finished but I found an answer on another website, basically just a keyring issue hope this is any help:

`sudo pacman -Sy archlinux-keyring`
`sudo pacman -Syu`


https://forum.endeavouros.com/t/problem … rade/43546

Last edited by BlankSaint (2023-08-09 11:33:15)

Offline

#10 2023-08-09 12:21:49

seth
Member
Registered: 2012-09-03
Posts: 59,999

Re: [SOLVED] Cannot upgrade packages due to few corrupt/invalid packages

I've been having this error for a while

error: electron22: signature from "Caleb Maclennan <alerque@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/electron22-22.3.18-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
seth wrote:
pacman -Qikk archlinux-keyring
sudo pacman -Sy archlinux-keyring
pacman-key -l alerque@archlinux.org

It appears as the key is now up to date.

And there've been 8 posts before yours, "unanswered" posts have exactly 1 post.
Please don't register just to necrobump solved threads to parrot the solution in that thread w/ a PSA that's even in the wiki
https://wiki.archlinux.org/title/Pacman … )%22_error
https://wiki.archlinux.org/title/Pacman … _regularly

Makes you look like a bot.

Offline

Board footer

Powered by FluxBB