You are not logged in.
Pages: 1
While running "pacman -Syu", my laptop ran out of power and now it fails to boot.
I booted the live system, mounted the laptop's partitions, and chrooted into the Arch system.
When I try to complete the failed update, I get many error messages indicating that gpgme is messed up:
[root@archiso ~]# pacman -Syu
...
:: Proceed with installation? [Y/n]
error: GPGME error: Invalid crypto engine
I tried to restore "gpgme" from the package cache using
[root@archiso ~]# pacman -U /var/cache/pacman/pkg/gpgme-1.17.1-1-x86_64.pkg.tar.ztd
loading packages...
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: '/var/cache/pacman/pkg/gpgme-1.17.1-1-x86_64.pkg.tar.zstd': invalid or corrupted package (PGP signature)
An attempt to restore "gnupg" returned the same errors.
With little hope, I tried resetting the keys next:
[root@archiso ~]# pacman-key --init
==> Generating pacman master key. This may take some time.
==> Updating trust database...
[root@archiso ~]# pacman-key --populate archlinux
==> ERROR: There is no secret key available to sign with.
==> Use 'pacman -key --init' to generate a default secret key.
Any other ideas?
Last edited by tucuxi (2022-05-28 18:54:15)
Offline
Offline
I followed the steps described in the article you linked to up to
pacman --sysroot /mnt -Syu
The result is one error message for each package scheduled for updating:
error: GPGME error: Invalid crypto engine
Next attempt: reinstall all packages using the same method, i.e.
pacman --sysroot /mnt -Qqn | pacman --sysroot /mnt -S -
Same error message, just more of them.
Offline
With a broken gpg you can not use the --sysroot option:
# pacman --root /mnt --cache /mnt/var/cache/pacman/pkg -Syu
Offline
Thanks, I will keep that in mind for next time. Meanwhile, I fixed my issues in the following way. Turns out that the broken gnupg package was just one of several dozen.
Delete all files that were installed by the gnupg package. (I got the list from a different Arch machine because pacman -Ql didn't work.)
pacstrap gnupg (Step 1 was necessary because pacstrap cannot overwrite existing files, apparently.)
arch-chroot
Reinstall all broken packages with pacman -S --override. These packages all had zero-sized files in /var/lib/pacman/local.)
Offline
Pages: 1