Pacman and Flatpak stopped working,

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. :point_down:

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.

Tried the mirrors again and it still doesn’t work.

India (if you meant where did I get the file from then it was linux from scratch)

yeah no I get it, I just tried lookin for solutions and that was one on a stackoverflow question.

stating the obvious:
We can’t see what you see.

sudo pacman-mirrors -f

likely didn’t fail

sudo pacman -Syu

(which is the second of the compound command)
might have failed

How?

Show us the output you get.

Didn’t fail, the system is up to date.

:: 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.

Have you tried… :point_down:

…?

Yes I have.

Try this… :point_down:

sudo pacman-key --refresh-keys && sudo pacman-key --populate archlinux manjaro
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.

This won’t fix anything, but just for information purposes, what is the output from

ldd /usr/bin/gpg | grep libassuan

Please make sure this is not an XY problem

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.

 $ ldd /usr/bin/gpg | grep libassuan
        libassuan.so.9 => /usr/lib/libassuan.so.9 (0x00007192299cd000)

You can pull the package from an up-to-date mirror using pacman 2024-08-02T04:36:00Z

 $ mbn info libassuan -q
Branch         : archlinux
Name           : libassuan
Version        : 3.0.0-1
Repository     : core
Build Date     : Wed 17 Jul 2024 11:54:50 
Packager       : David Runge <dvzrv@archlinux.org>

Branch         : unstable
Name           : libassuan
Version        : 3.0.0-1
Repository     : core
Build Date     : Wed 17 Jul 2024 11:54:50 
Packager       : David Runge <dvzrv@archlinux.org>

Branch         : testing
Name           : libassuan
Version        : 3.0.0-1
Repository     : core
Build Date     : Wed 17 Jul 2024 11:54:50 
Packager       : David Runge <dvzrv@archlinux.org>

Branch         : stable
Name           : libassuan
Version        : 3.0.0-1
Repository     : core
Build Date     : Wed 17 Jul 2024 11:54:50 
Packager       : David Runge <dvzrv@archlinux.org>
sudo pacman -U https://mirror.easyname.at/manjaro/pool/sync/libassuan-3.0.0-1-x86_64.pkg.tar.zst

As for key errors see → Pacman troubleshooting - Manjaro

1 Like

I get this:

libassuan.so.0 => not found
No package owns libassuan.so.0

When I try to pull libassuan as you mentioned:

this is what I get:

:: Retrieving packages...
 libassuan-3.0.0-1-x86_64         112.2 KiB  79.2 KiB/s 00:01 [#################################] 100%
loading packages...
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: '/var/cache/pacman/pkg/libassuan-3.0.0-1-x86_64.pkg.tar.zst': invalid or corrupted package (PGP signature)

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.

It is possible to fetch the package using curl or wget then execute the update command.

Open a terminal in your home

curl -O https://mirror.easyname.at/manjaro/pool/sync/libassuan-3.0.0-1-x86_64.pkg.tar.zst
sudo pacman -U libassuan-3.0.0-1-x86_64.pkg.tar.zst

But the outcome is unpredicable.

  • Is gnupg the right version?
  • 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

 $ cat /var/log/pacman.log | grep libassuan
[2024-07-22T03:39:54+0200] [ALPM] upgraded libassuan (2.5.7-2 -> 3.0.0-1)

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.

1 Like

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).

https://wiki.archlinux.org/title/Pacman#Manually_reinstalling_pacman

[2024-07-30T22:35:18+0530] [ALPM] upgraded libassuan (2.5.7-2 -> 3.0.0-1)
[2024-08-01T17:59:22+0530] [PACMAN] Running 'pacman -S --config /etc/pacman.conf -- core/libassuan'
[2024-08-01T18:21:04+0530] [PACMAN] Running 'pacman -Syu libassuan'
[2024-08-01T22:53:59+0530] [PACMAN] Running 'pacman -Syu libassuan'
[2024-08-01T23:29:32+0530] [PACMAN] Running 'pacman -Syu libassuan'
[2024-08-02T10:55:22+0530] [PACMAN] Running 'pacman -S libassuan'
[2024-08-02T10:58:07+0530] [PACMAN] Running 'pacman -U https://mirror.easyname.at/manjaro/pool/sync/libassuan-3.0.0-1-x86_64.pkg.tar.zst'
[2024-08-02T14:06:25+0530] [PACMAN] Running 'pacman -U libassuan-3.0.0-1-x86_64.pkg.tar.zst'
[2024-08-02T14:06:26+0530] [ALPM] reinstalled libassuan (3.0.0-1)
[2024-08-02T14:06:43+0530] [PACMAN] Running 'pacman -U libassuan-3.0.0-1-x86_64.pkg.tar.zst'
[2024-08-02T14:06:44+0530] [ALPM] reinstalled libassuan (3.0.0-1)
[2024-08-02T14:06:58+0530] [PACMAN] Running 'pacman -S libassuan'

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 ^^.

I guess I’ll have to be more careful installing from the AUR

Maybe don’t replaces packages from [core] repository

The gnupg-largekeys you installed needed to be rebuilded against the new libassuan version

1 Like

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