Unable to update (key issues / corrupted packages)

Sorry, but this command always gives me the same old error about the PGP signature.

1 Like

No worry, it will still downloads the packages… it just failed to check the signature. It is harmless…

sudo pacman -U /var/cache/pacman/pkg/*.tar.zst
loading packages...
warning: archlinux-keyring-20211028-1 is up to date -- reinstalling
warning: manjaro-keyring-20210910-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (2) archlinux-keyring-20211028-1  manjaro-keyring-20210910-2

Total Installed Size:  1,53 MiB
Net Upgrade Size:      1,36 MiB

:: Proceed with installation? [Y/n] y
(2/2) checking keys in keyring                                            [##########################################] 100%
(2/2) checking package integrity                                          [##########################################] 100%
(2/2) loading package files                                               [##########################################] 100%
(2/2) checking for file conflicts                                         [##########################################] 100%
error: failed to commit transaction (conflicting files)
archlinux-keyring: /usr/share/pacman/keyrings/archlinux-revoked exists in filesystem
archlinux-keyring: /usr/share/pacman/keyrings/archlinux-trusted exists in filesystem
archlinux-keyring: /usr/share/pacman/keyrings/archlinux.gpg exists in filesystem
Errors occurred, no packages were upgraded.

Nothing has changed. Still I can’t install any new package.

Well then I assume the that the keyrings are the current ones… good.

It is possible that the keyrings are corrupted somehow…

To overwrite the paths:

sudo pacman -U /var/cache/pacman/pkg/*.tar.zst --overwrite /usr/share/pacman/keyrings/

or

sudo pacman -R archlinux-keyring manjaro-keyring
sudo pacman -U /var/cache/pacman/pkg/*.tar.zst

Then follow the sequence without installing the packages:

Please post all outputs here. :wink:

sudo pacman -R archlinux-keyring manjaro-keyring
[sudo] password for giulio: 
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing archlinux-keyring breaks dependency 'archlinux-keyring' required by pacman
:: removing manjaro-keyring breaks dependency 'manjaro-keyring' required by pacman

sudo pacman -U /var/cache/pacman/pkg/*.tar.zst
loading packages...
warning: archlinux-keyring-20211028-1 is up to date -- reinstalling
warning: manjaro-keyring-20210910-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (2) archlinux-keyring-20211028-1  manjaro-keyring-20210910-2

Total Installed Size:  1,53 MiB
Net Upgrade Size:      1,36 MiB

:: Proceed with installation? [Y/n] n

sudo pacman-key --init
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: key 075D87103B8C655A marked as ultimately trusted
gpg: directory '/etc/pacman.d/gnupg/openpgp-revocs.d' created
gpg: revocation certificate stored as '/etc/pacman.d/gnupg/openpgp-revocs.d/E58E5D3F2BE5BA91B7F9F0B5075D87103B8C655A.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

sudo pacman-key --populate archlinux manjaro
==> Appending keys from archlinux.gpg...
gpg: no valid OpenPGP data found.
==> Appending keys from manjaro.gpg...
gpg: error reading key: No public key
gpg: error reading key: No public key
==> Locally signing trusted keys in keyring...
  -> Locally signed 22 keys.
==> Importing owner trust values...
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
==> 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:  22  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  22  signed:   1  trust: 0-, 0q, 0n, 22m, 0f, 0u
gpg: next trustdb check due at 2022-04-20

Is this supposed to have changed anything? I’m still stuck.

btw, the correct command is pacman-key

megavolt helped a lot of people already, may be sometimes typos could be, I think you fixed the command correctly.


I noted that the

was not executed. Or just did not post it yet?


If your target action is to fix the issue according to megavolt’s suggestion, then why to stop at this point?

sudo pacman -U /var/cache/pacman/pkg/*.tar.zst --overwrite /usr/share/pacman/keyrings/
loading packages...
warning: archlinux-keyring-20211028-1 is up to date -- reinstalling
warning: manjaro-keyring-20210910-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (2) archlinux-keyring-20211028-1  manjaro-keyring-20210910-2

Total Installed Size:  1,53 MiB
Net Upgrade Size:      1,36 MiB

:: Proceed with installation? [Y/n] y
(2/2) checking keys in keyring                                            [##########################################] 100%
(2/2) checking package integrity                                          [##########################################] 100%
(2/2) loading package files                                               [##########################################] 100%
(2/2) checking for file conflicts                                         [##########################################] 100%
error: failed to commit transaction (conflicting files)
archlinux-keyring: /usr/share/pacman/keyrings/archlinux-revoked exists in filesystem
archlinux-keyring: /usr/share/pacman/keyrings/archlinux-trusted exists in filesystem
archlinux-keyring: /usr/share/pacman/keyrings/archlinux.gpg exists in filesystem
Errors occurred, no packages were upgraded.

I thought @megavolt said “without installing the packages”. But, as you can see from the output above, proceeding with the installation doesn’t change anything.

hammer and nail method:

sudo rm /usr/share/pacman/keyrings/archlinux*
sudo pacman -U /var/cache/pacman/pkg/*.tar.zst
3 Likes
loading packages...
warning: archlinux-keyring-20211028-1 is up to date -- reinstalling
warning: manjaro-keyring-20210910-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (2) archlinux-keyring-20211028-1  manjaro-keyring-20210910-2

Total Installed Size:  1,53 MiB
Net Upgrade Size:      1,36 MiB

:: Proceed with installation? [Y/n] y
(2/2) checking keys in keyring                                            [##########################################] 100%
(2/2) checking package integrity                                          [##########################################] 100%
(2/2) loading package files                                               [##########################################] 100%
(2/2) checking for file conflicts                                         [##########################################] 100%
(2/2) checking available disk space                                       [##########################################] 100%
:: Processing package changes...
(1/2) reinstalling archlinux-keyring                                      [##########################################] 100%
==> Appending keys from archlinux.gpg...
==> Locally signing trusted keys in keyring...
  -> Locally signed 6 keys.
==> Importing owner trust values...
gpg: setting ownertrust to 4
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 44 keys.
==> Updating trust database...
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 786C63F330D7CB92: no user ID for key signature packet of class 10
gpg: key 1EB2638FF56C0C53: no user ID for key signature packet of class 10
gpg: key 1EB2638FF56C0C53: no user ID for key signature packet of class 10
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  28  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  28  signed:  84  trust: 0-, 0q, 0n, 28m, 0f, 0u
gpg: depth: 2  valid:  79  signed:  26  trust: 79-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-01-20
==> Updating trust database...
gpg: next trustdb check due at 2022-01-20
(2/2) reinstalling manjaro-keyring                                        [##########################################] 100%
==> Appending keys from manjaro.gpg...
gpg: error reading key: No public key
gpg: error reading key: No public key
==> Disabling revoked keys in keyring...
  -> Disabled 2 keys.
==> Updating trust database...
gpg: next trustdb check due at 2022-01-20
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

OMG, looks like it worked! I’ve just successfully installed a new package!
Now what??

Whoooooaaaaa!

As most egoist in the community I penetrate into the talk: I need you to show us the output of the:

sudo pacman-key -l | wc -l

and

sudo pacman-key -l 5F7078DF1E0FDF8745D5B984108E0767D5F34DE4 86CFFCA918CF3AF47147588051E8B148A9999C34 02FD1C7A934E614545849F19A6234074498E9CEE 39F0EC1AE50B37E5F3196F09DAD3B211663CA268

1041

pub   rsa2048 2015-07-12 [SC]
      39F0EC1AE50B37E5F3196F09DAD3B211663CA268
uid           [  full  ] Bernhard Landauer <oberon@manjaro.org>
sub   rsa2048 2015-07-12 [E]
sub   dsa2048 2015-10-01 [S]

pub   rsa2048 2011-08-12 [SC]
      02FD1C7A934E614545849F19A6234074498E9CEE
uid           [marginal] 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]

pub   rsa2048 2010-11-12 [SC]
      86CFFCA918CF3AF47147588051E8B148A9999C34
uid           [  full  ] Evangelos Foutras <evangelos@foutrelis.com>
uid           [  full  ] Evangelos Foutras <foutrelis@gmail.com>
uid           [  full  ] Evangelos Foutras <foutrelis@archlinux.org>
sub   rsa2048 2010-11-12 [E]

Now you have honorary task to pay me my well-deserved pizza :pizza: :yum: just a joke

It should be done.

HOOOORRAAAAAYY!!!
WE DID THE MAIN PART AT LAST! Not all but main part!

That’s how mega voltage works!

1 Like

Now please do steps 4 and 5 from the Pacman troubleshooting - Manjaro
By that actions you will add several keys and refresh all you have now

2 Likes

You sir are a tresure! Thank you so much.
Now, maybe for future reference’s sake and for my own peace of mind:

  1. What was the right path in the end?
  2. How the hell do I keep this mess from happening again?
2 Likes
  1. The signature database must be somehow corrupted. So you need to overwrite/reinstall it again. It is not clear when and how this happens.
  2. Do an update at least every month. Manjaro is a rolling release. It doesn’t like long breaks. If that’s a problem, then consider a point release. Use pamac for updates on Manjaro, since it is the main package manager here although it is backwards compatible to pacman.
3 Likes

Understood! I do use Pamac, but also Octopi at times. Should I avoid that?

For practical reasons alone, I would stick with pamac/pacman. There is no real reason not to use Octopi, but using different software for the same function (managing software) can cause problems, as not all software is inherently perfect and they can bite each other in some way. However, it is up to the users what they like and what they risk.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.