import: error while loading shared libraries: libxml2.so.2

A pacman query clearly shows 'libxml2' is installed as it's part of 'core' package. So, are the python3 binding for the libxml2 and libxslt libraries

core/libxml2 2.14.3-1     [installed]
extra/python-lxml 5.4.0-1 [installed]

Querying the installed libxml2 for the actual artifact shows as

libxml2 /usr/lib/libxml2.so
libxml2 /usr/lib/libxml2.so.16
libxml2 /usr/lib/libxml2.so.16.0.3

the filesystem layout of the files is as

::  ls -l /usr/lib/libxml2*
lrwxrwxrwx 1 root root 13 May 13 15:31 /usr/lib/libxml2.so -> libxml2.so.16* lrwxrwxrwx 1 root root 17 May 13 15:31 /usr/lib/libxml2.so.16 -> libxml2.so.16.0.3*
-rwxr-xr-x 1 root root 1297360 May 13 15:31 /usr/lib/libxml2.so.16.0.3*


I recently faced the same issue, and I got an error which was something like:
/usr/lib/chromium/chromium: error while loading shared libraries: libxml2.so.2: 
cannot open shared object file: No such file or directory

When I tried to open chromium, it wouldn't launch because it couldn't find this 
library.

I checked pacman and could clearly see libxml2.so.16, just like in your output.

Old version of chromium 133.x.x requires libxml2.so.2, after the system upgrade 
the library version is set to libxml2.so.16
My Chromium did not get updated as it was in my IgnorePkg list in pacman config.

I upgraded chromium to it's latest version 137.x.x and the error was gone.

If you need libxml2.so.2 version, perhaps create a symlink of so.16 and see if 
you are able to fool your application that needs to ues it?

Does this help?

Warm regards
Ragini

Reply via email to