I accidentally broke pacman

Description:
Trying to fix the keyring I got a gnupg dependency issue after deleting keyring file. To download the new keyring I was forced to update gnupg, which required libassuan to also be updated. Updating libassuan without updating pacman broke pacman with the following error:

sudo pacman -Sy pacman manjaro-keyring archlinux-keyring
pacman: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory

Checking if the file is there confirms it is in fact not there, however libassuan.so.9 is there.

System Information:

Manjaro Version: 24.0.1
Desktop Environment: xfce
Compositor for DE: x11
Kernel Version: 6.6.32-1-MANJARO

The same thing has been discussed here a little while ago.
I don’t remember how it got solved.

There are a few potential ways apart from the “canonical” one:
there is a package pacman-static (self contained, no reliance on the broken system libraries)
and you could just very unconventionally go to your pacman cache,
/var/cache/pacman/pkg/
find the package that contains the missing lib, and unpack that package and copy the lib where it belongs.
Not lege artis, but it’ll work.

I often wonder how such things can even happen … often the source is some AUR package’s dependencies that replace system libs and then, a few days or weeks later, the system breaks.

package name is libassuan_some_number.tar.zst
The one that I have currently installed is:
libassuan.so.9.0.0
from:
libassuan-3.0.0-1-x86_64.pkg.tar.zst

Perhaps you can still use pamac? (no AUR at first)

So I did as you asked before you edited the message. That fixed things! Thank you so much! I still haven’t done a full system upgrade, I have the feeling that will break things again, but in the mean time this has brought my package manager back to a usable state. I had to use libassuan 2.5.7 because 3.0.0 does not have the 0 version, only the 9 version. After that I tried updating pacman but I got “already up to date” so I’m not sure where down the dependency tree libassuan 3.0.0 is needed, I’m guessing by gnupg, but I’m not there again yet. Thanks! Will refresh my signatures and try a full system upgrade again.

Some additional thoughts come to mind a few minutes later …
I didn’t change anything - I just added more.

It’s probably best to try and find the post(s) where this was discussed.

That is to be expected because pacman doesn’t know about what you did.
not lege artis, as I said
You are tampering with a pretty complex system by doing this.
Be prepared to revert that change …

1 Like

Surprisingly I was successfully able to update all 892 packages after all of that. My system has 2 Desktop environments and is 2 years old. Great advice.

As far as the cache and pacman not knowing what I did, is there no manifest or about document informing pacman which version is installed within the package itself?

there is - if you use pacman to install a package
but if you - like suggested here - just go ahead and unpack some package and copy the content or part of it over what is there, over what pacman knows about,
then you simply circumvent it - it has then no way to know what you did.

you are pulling the rug out under it’s feet - it this situation, you really need to know and remember what you did and why
pacman has no way of knowing that you came in and replaced a file …

1 Like

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