You are not logged in.

#1 2025-05-01 14:54:42

DixiRekt
Member
Registered: 2025-05-01
Posts: 1

Missing shared libraries after System Upgrade

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

#2 2025-05-01 15:24:48

seth
Member
Registered: 2012-09-03
Posts: 63,326

Re: Missing shared libraries after System Upgrade

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

#3 2025-05-01 16:37:19

ozwigh
Member
Registered: 2014-10-07
Posts: 33

Re: Missing shared libraries after System Upgrade

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

#4 2025-05-01 19:20:24

MonstraG
Member
Registered: 2025-05-01
Posts: 1

Re: Missing shared libraries after System Upgrade

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

#5 2025-05-01 19:34:01

spsf64
Member
From: FL, US or SP, BR
Registered: 2012-05-18
Posts: 103
Website

Re: Missing shared libraries after System Upgrade

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

#6 2025-05-01 19:38:09

seth
Member
Registered: 2012-09-03
Posts: 63,326

Re: Missing shared libraries after System Upgrade

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 tongue
(And likely install and utilize a container that provides the necessary library version)

Offline

#7 2025-05-01 22:06:37

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,638

Re: Missing shared libraries after System Upgrade

seth wrote:
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

#8 2025-05-02 09:20:09

KamilCuk
Member
Registered: 2021-03-02
Posts: 2

Re: Missing shared libraries after System Upgrade

Hi, install libxml2-legacy

Offline

#9 2025-05-02 10:44:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,638

Re: Missing shared libraries after System Upgrade

KamilCuk wrote:

Hi, install libxml2-legacy

No, do NOT cover up the problem. Fix it.

Offline

#10 2025-05-02 10:52:30

bsujja
Member
From: Thailand
Registered: 2013-01-27
Posts: 20

Re: Missing shared libraries after System Upgrade

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

#11 2025-05-02 19:11:45

npreining
Member
Registered: 2023-03-06
Posts: 29
Website

Re: Missing shared libraries after System Upgrade

Scimmia wrote:
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

#12 2025-05-02 20:24:11

seth
Member
Registered: 2012-09-03
Posts: 63,326

Re: Missing shared libraries after System Upgrade

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

#13 2025-05-02 20:47:57

npreining
Member
Registered: 2023-03-06
Posts: 29
Website

Re: Missing shared libraries after System Upgrade

seth wrote:

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

#14 2025-05-03 04:29:40

mackin_cheese
Member
Registered: 2025-01-07
Posts: 459

Re: Missing shared libraries after System Upgrade

Scimmia wrote:
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

#15 2025-05-03 06:05:37

seth
Member
Registered: 2012-09-03
Posts: 63,326

Re: Missing shared libraries after System Upgrade

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.

DOwuJt.gif

Offline

Board footer

Powered by FluxBB