Pacman: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory

Still hit the file not found on both kernels, Zen and LTS.

I got back into the chroot and confirmed this still shows up in usr/lib:

lrwxrwxrwx 1 root root      13 Apr 26 17:57 libxml2.so -> libxml2.so.16
lrwxrwxrwx 1 root root      17 Apr 26 17:57 libxml2.so.16 -> libxml2.so.16.0.2
-rwxr-xr-x 1 root root 1293256 Apr 26 17:57 libxml2.so.16.0.2
lrwxrwxrwx 1 root root      17 May 11 09:48 libxml2.so.2 -> libxml2.so.16.0.2

The symlink is present, now try again if pacman works so that you can reinstall the kernel. Without a working pacman you will not get any further.

Tried it, even just installing linux-lts. Regardless I get the following error:

sh-5.2# pacman -S linux-lts
pacman: /usr/lib/libxml2.so.2: no version information available (required by /usr/lib/libarchive.so.13)
pacman: /usr/lib/libxml2.so.2: no version information available (required by /usr/lib/libarchive.so.13)
pacman: /usr/lib/libxml2.so.2: no version information available (required by /usr/lib/libarchive.so.13)
pacman: /usr/lib/libxml2.so.2: no version information available (required by /usr/lib/libarchive.so.13)
pacman: /usr/lib/libxml2.so.2: no version information available (required by /usr/lib/libarchive.so.13)
pacman: symbol lookup error: /usr/lib/libarchive.so.13: undefined symbol: UTF8Toisolat1, version LIBXML2_2.4.30

Checking libarchive, I see:

ls -la libarchive*
lrwxrwxrwx 1 root root     20 Mar 31 00:38 libarchive.so -> libarchive.so.13.7.9
lrwxrwxrwx 1 root root     20 Mar 31 00:38 libarchive.so.13 -> libarchive.so.13.7.9
-rwxr-xr-x 1 root root 870352 Mar 31 00:38 libarchive.so.13.7.9

It’s odd to me that it’s going back to the /usr/lib/libxml2.so.2 as the error when it’s symlinked.

Edit: The link: https://wiki.archlinux.org/title/Pacman#Manually_reinstalling_pacman

I see the static pacman and the option of using the live iso. I may try to add the -root flag and running it that way to attempt to install the kernels.

Edit 2: I am updating now. Apparently my hard disk also was full. Maybe that’s why I ended up having the failed update (though I recall no message saying anything about not enough space). So it seems like

  • The disk got full and that left to the update failing
  • Then the failed update broke libxml2 and the kernel.
  • This left me unable to update.

So I was stuck in this limbo. The way I resolved it was:

  • Get into the live usb
  • Download pacman-static binary:
    https://aur.archlinux.org/packages/pacman-static
  • Used the garuda-chroot info here to mount:
    https://forum.garudalinux.org/t/how-to-chroot-garuda-linux/4004
  • mounting the home folder:
    mount -o subvol=@home /dev/nvme0np2 /mnt/home
  • navigating to my home folder
    cd /mnt/home/<user>/.local/steam
  • Looking through the folders there. Picking a game
    rm -r dir
  • copied the pacman-static
    cd Downloads
    sudo cp pacman-static /mnt/broken/@/.
  • Used the rest of the garuda-chroot info to login and add the boot mount point

after garuda-chroot

  • Ran ./pacman-static -Su -yy as it appears that’s what garuda-update was running
  • Ran into a conflicting files error. Ran:
    ./pacman-static -Scc
    Yes to both
  • Ran ./pacman-static -Su -yy again
    No dice… There were a lot of conflicting files.

Eventually after a lot of research. I elected to try the command below. DO NOT do this unless you’re prepared to possibly not have things work. I elected this route because I had so many conflicting files:
THIS IS A LAST RESORT
./pacman-static -Su -yy --overwrite '*'

This worked. I then unlinked the symlink from above and ran
pacman -S libxml2-legacy
It installed correctly.

I had to go to the advance option and select a Kernel, but I’ve successfully booted back in and ran garuda-update and flatpak update. I’m running paru now.

I’m sure there’s going to be fallout so will be working to reinstall here at some point soon.

3 Likes

Yes, it’s highly likely that you had file corruption/partial files from disk full. I’m sure you know this, but generally, when you get about 80% you should think of house cleaning (for safety’s sake).
I did this just yesterday, when my system monitoring starting showing disk as a yellow condition (70%). I had crud that I had just let pile up (downloads).

1 Like

Root full, once again. :grin:

And you’re right:

We overlooked that, including me. :person_facepalming:

But it’s good to hear that everything is working again. :smiley:

2 Likes

This is defn a case where maybe a good recommendation would be to put data on a separate partition space from / :slight_smile:
I know that’s not a distro problem, but more a user one.

1 Like

Now, in retrospect: everything indicated from the beginning that the drive was full - including the failed troubleshooting steps. As I said, with hindsight. :slightly_smiling_face:

I think we should check off the topic with the slogan ā€œweekend supportā€. :sweat_smile:

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.