You are not logged in.
I'm still fairly new to arch with a basic understanding of how to work my way around problems, so please bare with me!
A while ago, I did a full system upgrade that broke some dependencies. I thought I had patched everything up enough to keep using my system without issues, until I recently tried setting up a jellyfin server. When trying to start the server, I was met with an ffmpeg error. I tried reinstalling ffmpeg at first, but that didn't work. When I would try and start ffmpeg, I was met wth the error:
ffmpeg: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory
With this error, I tried force reinstalling libxml2, optionally breaking any dependencies along with the reinstall. After doing this, my entire system started acting up, and the package couldn't be installed. I now receive the following pacman error:
pacman: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory
After having this happen, I figured the next logical step would be to start up my Windows 11 drive and use wsl to compare library files in /usr/lib. I mounted my arch linux harddrive copied over all library files from the wsl arch installation over to the harddrive. I then chroot into the installation to test pacman with:
pacman -Syy
but still to no avail. After searching online for a while, I came across this forum post.
https://bbs.archlinux.org/viewtopic.php?id=293993
Using this command I found from the following forum post:
pacman --sysroot /mnt -Qnq | pacman --sysroot /mnt -S --dbonly -
I reinstalled all my packages. but I'm still coming across the same error. Now using most applications (even terminal apps) I am met with a missing shared library error almost everytime. I'm at a complete loss and would really appreciate any help if possible!
Offline
https://bbs.archlinux.org/viewtopic.php … 9#p2239439
pacman -Syy
man pacman, check what the second y does, then stop doing this.
I mounted my arch linux harddrive copied over all library files from the wsl arch
Good god, gracious.
Boot the install iso, you'll likely have to use its pacman (opr pacman-static) to unfuck yourself out of this.
sudo LC_ALL=C pacman --root /mnt -Qkk | grep -v ', 0 altered files' | grep -v backup
pacman --root /mnt -Qi ffmpeg pacman libxml # there's gonna by some dated/aur package in here
"--root /mnt" imples that the installed system has been copied there.
The "--dbonly" command will only sanitize the databases, not install any actual packages
Offline
Weird. It looks like you're using a (very) outdated or not fully synced mirror. 'Cause up-to-date system uses:
$ ls /usr/lib/libxml2*
/usr/lib/libxml2.so /usr/lib/libxml2.so.16 /usr/lib/libxml2.so.16.0.2
$ ldd /usr/bin/pacman | grep xml2
libxml2.so.16 => /usr/lib/libxml2.so.16 (0x000072d071558000)
$ ldd /usr/bin/ffmpeg | grep xml2
libxml2.so.16 => /usr/lib/libxml2.so.16 (0x00007e46ed57a000)
Current libxml2 version is 2.14.2-2, it provides:
$ ls /usr/lib/libxml2*
/usr/lib/libxml2.so /usr/lib/libxml2.so.16 /usr/lib/libxml2.so.16.0.2
You didn't skip any packages during the latest full update? 'Cause ignoring libs is dangerous. It can make your system unusable right now, even before rebooting (especially dangerous is ignoring stuff like icu).
But don't panic. It's fixable. First, choose up-to-date mirror at https://archlinux.org/mirrors/status. Then, boot from the latest Arch installation media. Edit /etc/pacman.d/mirrorlist if needed. Mount all your directories under /mnt. Refer to the https://wiki.archlinux.org/title/Installation_guide#Mount_the_file_systems if needed. Then do:
$ pacman -Syy
$ pacstrap /mnt base
// now you'll be able to run at least shell and pacman
$ arch-chroot /mnt
// you're now in your system
$ pacman -Syu
// update everything
Then leave chroot (Ctrl-D), unmount filesystems, and reboot. All should work now.
Offline
I just gonna hop in here because of exactly the same problem but different program. In my case it was Unity (the game engine editor) who's been missing libxml2.so.2, with the same error. But I later found https://discussions.unity.com/t/arch-li … ng/1637394
Heads up for arch users. Since the latest update libxml2 got bumped so libxml2.so.2 is missing.
(instructions on how to deal with this follow)
Last edited by MonstraG (2025-05-01 19:21:35)
Offline
It also happens with Libreoffice Appimage:
15:28:12 /home/linux/AppImages > ./libreoffice.appimage
libreoffice25.2: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory
Sergio S.
Offline
This will happen with absolutely everything that hasn't been built against the new libxml.
For source-based AUR packages you'll likely just have to rebuild them, for binary only releases you might have to provide the older libxml (and in doubt LD_PRELOAD it, no need to put it into the ld paths) for containers, you've to accept that container promises are lies
(And likely install and utilize a container that provides the necessary library version)
Offline
sudo LC_ALL=C pacman --root /mnt -Qkk | grep -v ', 0 altered files' | grep -v backup pacman --root /mnt -Qi ffmpeg pacman libxml # there's gonna by some dated/aur package in here
Add libarchive to that second pacman call. That's the only thing that pulls in libxml for pacman. You're either holding that back or have replaced it with something else.
Offline
Hi, install libxml2-legacy
Offline
Hi, install libxml2-legacy
No, do NOT cover up the problem. Fix it.
Offline
I encountered this today which caused my php81-fpm unable to start. Following the link provided by post #4 solved the problem for me.
Offline
KamilCuk wrote:Hi, install libxml2-legacy
No, do NOT cover up the problem. Fix it.
It is not covering up, there are several packages that are binary builds (like cisco vpn) that are core to many users, and are broken by the libxml update.
Backward compatibility going to the bonkers. Congratulation.
Offline
Yes, see #6 - but the OP ran into this w/ ffmpeg and then perhaps pacman - using an older version of libxml to deal with *that* is wrong.
Offline
Yes, see #6 - but the OP ran into this w/ ffmpeg and then perhaps pacman - using an older version of libxml to deal with *that* is wrong.
Agreed on that. Anything that can be compiled by users or distributors needs to be fixed.
Rollout (pacman) should be able to back off updating until all packages have working versions available.
Unfortunately, the cisco-vpn package does not have the correct dependencies and thus the update was carried out and broke cisco-vpn.
Offline
KamilCuk wrote:Hi, install libxml2-legacy
No, do NOT cover up the problem. Fix it.
APOLOGIES SCIMMIA, I MISUNDERSTOOD.
1. that is the solution, not a cover up.
2. it's not arch developers responsibility to "fix" the libxml2 "issue", and i say issue in quotes because libxml2 is not the issue, it's binaries that weren't built on the new libraries that is the issue.
Arch philosophy is to keep it as base to upstream as possible.
They have not only kept it upstream, but they built official packages with the new library AND they also, out of the goodness of their hearts, provided a arch exclusive fix for AUR packages: libxml2-legacy.
Arch developers did more then their responsibility, they went above and beyond. it's not a cover up
Last edited by mackin_cheese (2025-05-03 06:20:27)
Offline
I believe you drastically misunderstood Scimmia there, resp. misinterpreted the context.
KamilCuk suggested to utilize libxml2-legacy, but the symptoms in the OP affect what's either a repo package (would have been rebuild, so likely partial update) or an AUR package (needs to be replaced or rebuilt by the OP), but not to cover up the actual problem (somehow dated ffmpeg, then apparently worsened by partial downgrades) by providing an unnecessary legacy library.
libxml2-legacy is for when one is dealing with binary only released software that one cannot rebuild yourself and have to wait for the vendor to move their ass.
It is *not* a solution for ones system being in dispair and one needs to move one own ass out of the couch.
Offline