Error while loading error while loading shared libraries [How to Solve]

Error while loading error while loading shared libraries solution

If it’s missing, find it and put it back

Distribution: archlinux
as stated in the title, take the yaourt encountered before writing this article as an example:

➜  ~ yaourt -Ss uswsusp
yaourt: error while loading shared libraries: libalpm.so.12

After looking at the in the system, I found that libalpm. So has been upgraded to 13

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

Well, the problem is very simple. The library has been upgraded, but the dependent software developers have not upgraded.

Next, only three steps are required:
confirm the software from libalpm. So and download the old version (which may contain 12 generally open the package. You can directly find the corresponding link library and copy it to under /usr/Lib My detailed steps:
the search discovery 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 software package of archlinux, you need to find it in 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 it directly and find libalpm. So. 12


finally, copy the extracted libalpm. So. * to /usr/lib ( Be careful not to copy the one without version suffix ( libalpm. So )


Read More: