Hey so I have no clue what happened everything was fine until I boot my Manjaro Gnome today just to find out that all my package managers are broken. They all say the same thing while trying to install something:
resolving dependencies...
looking for conflicting packages...
Packages (1) discord-0.0.62-1
Total Download Size: 75.67 MiB
Total Installed Size: 249.76 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
discord-0.0.62-1-x86_64 75.7 MiB 2.55 MiB/s 00:30 [#################################] 100%
(1/1) checking keys in keyring [#################################] 100%
error: GPGME error: Invalid crypto engine
(1/1) checking package integrity [#################################] 100%
error: GPGME error: Invalid crypto engine
error: discord: missing required signature
:: File /var/cache/pacman/pkg/discord-0.0.62-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 (PGP signature))
Errors occurred, no packages were upgraded.
This is what I get when I try to install discord or any other application. Invalid crypto engin and invalid PGP signature. I researched and found that I need to update my keyrings but it’s giving the same error. When I do:
sudo pacman-key --refresh-keys
or even init I get:
gpg: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory
gpg: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory
==> Generating pacman master key. This may take some time.
gpg: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory
==> Updating trust database...
gpg: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory
==> ERROR: Trust database could not be updated.
I tried manually downloading libassuan and putting the files in lib but the tar didn’t contain .so.0 so it doesn’t work and I have no clue how to fix this. Any help would be greatly appreciated.
P.S. I have also tried the fix on manjaro forum of editing the pacman conf but it doesn’t work.
The first things to try in situations like this are to check your network connection, refresh your mirrors, and ensure that your system is up to date.
sudo pacman-mirrors -f && pacman -Syu
Where from? Either way, you should never do that unless you know what you’re doing, which — no insult intended — strongly appears not to be the case.
:: Synchronizing package databases...
core is up to date
extra is up to date
multilib is up to date
:: Starting full system upgrade...
warning: nano-syntax-highlighting: local (2020.10.10+10+g1aa64a8-2) is newer than extra (2020.10.10-2)
there is nothing to do
It only throws an error while installing a new package. This is when i tried to install discord after updating mirrors (which I’ve done twice previously)
resolving dependencies...
looking for conflicting packages...
Packages (1) discord-0.0.62-1
Total Download Size: 75.67 MiB
Total Installed Size: 249.76 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
discord-0.0.62-1-x86_64 75.7 MiB 2.40 MiB/s 00:31 [#################################] 100%
(1/1) checking keys in keyring [#################################] 100%
error: GPGME error: Invalid crypto engine
(1/1) checking package integrity [#################################] 100%
error: GPGME error: Invalid crypto engine
error: discord: missing required signature
:: File /var/cache/pacman/pkg/discord-0.0.62-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 (PGP signature))
Errors occurred, no packages were upgraded.
gpg: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory
gpg: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory
gpg: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory
==> ERROR: There is no secret key available to sign with.
==> Use 'pacman-key --init' to generate a default secret key.
If I do
pacman-key --init
I get
gpg: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory
gpg: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory
==> Generating pacman master key. This may take some time.
gpg: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory
==> Updating trust database...
gpg: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory
==> ERROR: Trust database could not be updated.
libassuan.so.0 is provided by the package libassuan
$ pamac search -f libassuan.so.0
/usr/lib/libassuan.so.0 is owned by libassuan
/usr/lib/libassuan.so.0.8.7 is owned by libassuan
and required by gnupg
$ pamac info libassuan
Name : libassuan
Version : 3.0.0-1
Description : IPC library used by some GnuPG related software
URL : https://www.gnupg.org/related_software/libassuan/
Licenses : FSFULLR GPL-2.0-or-later LGPL-2.1-or-later
Repository : core
Installed Size : 245,2 kB
Groups : --
Depends On : glibc libgpg-error sh
Optional Dependencies : --
Required By : gnupg gpgme kleopatra pinentry
Optional For : --
Provides : libassuan.so=9-64
Replaces : --
Conflicts With : --
Packager : David Runge <dvzrv@archlinux.org>
Build Date : ons 17 jul 2024 11:54:50 CEST
Install Date : man 22 jul 2024 03:39:54 CEST
Install Reason : Installed as a dependency for another package
Validated By : Signature
Backup files : --
So if you don’t have that specific library your issue has another reason, and you need to fix that underlying issue.
It’s like I’m stuck in a loop, somehow the libassuan.so.0 disappeared which is related to having valid keyrings which in turn makes it unable to install packages. I have no clue how this happened, I haven’t removed any package recently.
I’m also a bit hesitant to try the solution in there to remove the keyrings and then install them back as I don’t know if it’ll even install and just increase the work.
Is there other dependencies missing or wrong versions?
This is an XY problem - what you describe as pacman and flatpak stopped working is not the real issue.
The real issue is that applications necessary for pacman to work has been removed - could be due to an interruption during a recent update as an update is technically - remove old package (execute supplied scripts and hooks) - unpack new package (execute supplied scripts and hooks) .
You are the system administrator - you know what happened - if you want to know when - check the log /var/log/pacman.log - search for libassuan
I have no suggestions on how to fix this in any easy way and the outcome is unpredicatable as the system is in an unsupported state.
Therefore - at this point I suggest you bite the bun - backup your data to external media - and reinstall the system.
If you really want to learn about your system - you could browse your /var/cache/pacman/pkg - manually unpack relevant packages - copy their content to the filesystem and retry the operation.
For a fuller picture, could you show us the output from
pacman -Qikk gnupg libassuan
I think linux-aarhus’s suggestion of backup and reinstallation is likely the fastest and most straightforward path back to normalcy. But if you want alternatives, the Arch wiki offers 3 methods for dealing with a nonfunctioning pacman (the third of which comes with a strong warning, so please be aware of what you are getting into).
Still is giving all the same errors as before. I guess I’ll just reinstall the system. Was hoping it wouldn’t come to that but welp.
Is there anything I can do to prevent this in the future? I update my system regularly and don’t tinker with it much either as I daily drive it for my work.
Name : gnupg-largekeys
Version : 2.4.5-1
Description : Complete and free implementation of the OpenPGP standard
Architecture : x86_64
URL : https://www.gnupg.org
Licenses : GPL
Groups : None
Provides : gnupg2=2.4.5 gnupg=2.4.5
Depends On : npth libgpg-error libgcrypt libksba libassuan pinentry bzip2 readline
gnutls sqlite
Optional Deps : libldap: gpg2keys_ldap [installed]
libusb-compat: scdaemon [installed]
pcsclite: scdaemon [installed]
Required By : gpgme pacman thunderbird
Optional For : None
Conflicts With : gnupg2 gnupg
Replaces : gnupg2 gnupg
Installed Size : 10.25 MiB
Packager : Unknown Packager
Build Date : Wednesday 24 July 2024 02:50:31 PM
Install Date : Wednesday 24 July 2024 02:53:45 PM
Install Reason : Explicitly installed
Install Script : Yes
Validated By : None
gnupg-largekeys: 209 total files, 0 altered files
Name : libassuan
Version : 3.0.0-1
Description : IPC library used by some GnuPG related software
Architecture : x86_64
URL : https://www.gnupg.org/related_software/libassuan/
Licenses : FSFULLR GPL-2.0-or-later LGPL-2.1-or-later
Groups : None
Provides : libassuan.so=9-64
Depends On : glibc libgpg-error sh
Optional Deps : None
Required By : gnupg-largekeys gpgme pinentry
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 239.46 KiB
Packager : David Runge <dvzrv@archlinux.org>
Build Date : Wednesday 17 July 2024 03:24:50 PM
Install Date : Friday 02 August 2024 02:06:44 PM
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : None
libassuan: 20 total files, 0 altered files
Yeah I’ll just reinstall as I don’t really have the time to fix it as of now. If it comes up again (hopefully never) then i’ll check it out thanks.
It appears some custom package has replaced the gnupg package with a custom one.
Search the pacman log for gnupg-largekeys same way
grep -e 'gnupg-largekeys' /var/log/pacman.log
This should give you an idea of when…
I think you just revealed the issue - this is a custom package from AUR … it could have replaced important system libraries.
$ pamac info gnupg-largekeys
Name : gnupg-largekeys
Version : 2.4.5-1
Description : Complete and free implementation of the OpenPGP standard
URL : https://www.gnupg.org
Licenses : GPL
Repository : AUR
Groups : --
Depends On : npth libgpg-error libgcrypt libksba libassuan pinentry bzip2 readline gnutls sqlite
Optional Dependencies : libldap [Installed]
libusb-compat
pcsclite [Installed]
Make Dependencies : libldap libusb-compat pcsclite
Check Dependencies : openssh
Provides : gnupg2=2.4.5 gnupg=2.4.5
Replaces : gnupg2 gnupg
Conflicts With : gnupg2 gnupg
Maintainer : xgjmibzr
First Submitted : man 04 nov 2013 03:45:34 CET
Last Modified : fre 31 maj 2024 00:10:18 CEST
Votes : 4
Out of Date : --
Don’t have the old system anymore so can’t work it out which package exactly caused it. I guess I’ll have to be more careful installing from the AUR. Thanks for all the help everyone I appreciate it ^^.