Error while loading error while loading shared libraries

created at 08-26-2021 views: 12


  • Distribution: Archlinux


The error is as the title says, here is an example of the yaourt encountered before writing the article:

➜  ~ yaourt -Ss uswsusp
yaourt: error while loading shared libraries:

I looked at the system and found that has been upgraded to 13

➜  ~ ls -l /usr/lib/*
lrwxrwxrwx 1 root root     13 Jul 16 03:26 /usr/lib/ ->
lrwxrwxrwx 1 root root     17 Jul 16 03:26 /usr/lib/ ->
-rwxr-xr-x 1 root root 243608 Jul 16 03:26 /usr/lib/

Then, the problem is very simple, the library is upgraded, and the dependent software developers have not upgraded.


Next, only three steps are required:

  1. Confirm the software that comes from, and download the old version (which may contain the 12 we need)
  2. Generally open the package, you can directly find the corresponding link library
  3. Copy to /usr/lib

My detailed steps:

The search found that it may be in the pacman package

➜  ~ pacman -Ss libalpm
core/pacman 6.0.0-5 (base-devel) [installed]
    A library-based package manager with dependency support
extra/pyalpm 0.10.6-1
    Python 3 bindings for libalpm
(..... Other insignificant packages)

To download the old packages of Archlinux, you need to find it in the Arch archive.

In the /packages/p/pacman/ directory, I tried to download the previous version of the current version (v6.0.0), pacman-5.2.2-4-x86_64.pkg.tar.zst.

Open directly and found

Finally, copy the decompressed* to /usr/lib. (Be careful not to copy the without the version suffix).

created at:08-26-2021
edited at: 08-26-2021: