Pacman broken cant boot - libxml2.so.2: cannot open shared object file

Hey folks hope you can help me out of trouble this time …
yesterday everything was fine but i booted today and only get into TTY with following error:

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

unfortunately i cant boot into snapshots because of some mount root issues?
garuda-update get me the same error with libxm12 :confused: im stuck here
How i can i repair pacman and can get back into my system…?

Inxi:

> System:
>   Kernel: 6.12.16-1-lts arch: x86_64 bits: 64 compiler: gcc v: 14.2.1 clocksource: tsc
>     avail: hpet,acpi_pm parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-lts
>     root=UUID=853b684f-13b9-4c24-8786-192e48eb49a3 rw rootflags=subvol=@ quiet
>     resume=UUID=4cf0c5d9-7d4a-40c4-8082-7db635b31ea0 loglevel=3 ibt=off
>   Console: tty 2 DM: LightDM v: 1.32.0 Distro: Garuda base: Arch Linux
> Machine:
>   Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
>   Mobo: ASUSTeK model: ROG STRIX X670E-I GAMING WIFI v: Rev 1.xx serial: <superuser required>
>     part-nu: SKU uuid: <superuser required> UEFI: American Megatrends v: 3067 date: 12/10/2024
> Battery:
>   Device-1: hidpp_battery_0 model: Logitech MX Vertical Advanced Ergonomic Mouse serial: <filter>
>     charge: 55% (should be ignored) rechargeable: yes status: discharging
> CPU:
>   Info: model: AMD Ryzen 7 7800X3D bits: 64 type: MT MCP arch: Zen 4 gen: 4 level: v4 note: check
>     built: 2022+ process: TSMC n5 (5nm) family: 0x19 (25) model-id: 0x61 (97) stepping: 2
>     microcode: 0xA601209
>   Topology: cpus: 1x dies: 1 clusters: 1 cores: 8 threads: 16 tpc: 2 smt: enabled cache:
>     L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 8 MiB desc: 8x1024 KiB L3: 96 MiB desc: 1x96 MiB
>   Speed (MHz): avg: 545 min/max: 545/5050 boost: enabled scaling: driver: amd-pstate-epp
>     governor: performance cores: 1: 545 2: 545 3: 545 4: 545 5: 545 6: 545 7: 545 8: 545 9: 545
>     10: 545 11: 545 12: 545 13: 545 14: 545 15: 545 16: 545 bogomips: 134463
>   Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
>   Vulnerabilities: <filter>
> Graphics:
>   Device-1: NVIDIA AD102 [GeForce RTX 4090] driver: nvidia v: 570.86.16
>     alternate: nouveau,nvidia_drm non-free: 550/565.xx+ status: current (as of 2025-01)
>     arch: Lovelace code: AD1xx process: TSMC n4 (5nm) built: 2022+ pcie: gen: 1 speed: 2.5 GT/s
>     lanes: 16 link-max: gen: 4 speed: 16 GT/s ports: active: none off: DP-2
>     empty: DP-1,DP-3,HDMI-A-1 bus-ID: 01:00.0 chip-ID: 10de:2684 class-ID: 0300
>   Device-2: Sunplus Innovation FHD Camera Microphone driver: snd-usb-audio,uvcvideo type: USB
>     rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 11-1.3:4 chip-ID: 1bcf:28c4 class-ID: 0102
>     serial: <filter>
>   Display: unspecified server: X.org v: 1.21.1.16 with: Xwayland v: 24.1.6 driver: X:
>     loaded: nvidia unloaded: modesetting alternate: fbdev,nouveau,nv,vesa
>     gpu: nvidia,nvidia-nvswitch tty: 192x54
>   Monitor-1: DP-2 model: Acer XB253Q serial: <filter> built: 2021 res: 1920x1080 dpi: 90
>     gamma: 1.2 size: 543x302mm (21.38x11.89") diag: 621mm (24.5") ratio: 16:9 modes: max: 1920x1080
>     min: 640x480
>   API: EGL v: 1.5 hw: drv: nvidia platforms: gbm: drv: nvidia surfaceless: drv: nvidia
>     inactive: wayland,x11
>   API: OpenGL v: 4.6.0 vendor: nvidia v: 570.86.16 note: console (EGL sourced) renderer: NVIDIA
>     GeForce RTX 4090/PCIe/SSE2
>   API: Vulkan v: 1.4.303 layers: 6 device: 0 type: discrete-gpu name: NVIDIA GeForce RTX 4090
>     driver: N/A device-ID: 10de:2684 surfaces: N/A
>   Info: Tools: api: eglinfo, glxinfo, vulkaninfo gpu: nvidia-settings,nvidia-smi
>     x11: xdpyinfo, xprop, xrandr
> Audio:
>   Device-1: NVIDIA AD102 High Definition Audio driver: snd_hda_intel v: kernel pcie: gen: 4
>     speed: 16 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:22ba class-ID: 0403
>   Device-2: Sunplus Innovation FHD Camera Microphone driver: snd-usb-audio,uvcvideo type: USB
>     rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 11-1.3:4 chip-ID: 1bcf:28c4 class-ID: 0102
>     serial: <filter>
>   API: ALSA v: k6.12.16-1-lts status: kernel-api with: aoss type: oss-emulator tools: N/A
>   Server-1: PipeWire v: 1.2.7 status: off with: 1: pipewire-pulse status: off 2: wireplumber
>     status: off 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
>     tools: pactl,pw-cat,pw-cli,wpctl
> Network:
>   Device-1: Intel Ethernet I225-V vendor: ASUSTeK driver: igc v: kernel pcie: gen: 2 speed: 5 GT/s
>     lanes: 1 port: N/A bus-ID: 5f:00.0 chip-ID: 8086:15f3 class-ID: 0200
>   IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
>   Device-2: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter vendor: Foxconn
>     driver: mt7921e v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 bus-ID: 60:00.0 chip-ID: 14c3:0616
>     class-ID: 0280
>   IF: wlp96s0 state: down mac: <filter>
>   Info: services: NetworkManager, smbd, systemd-timesyncd, wpa_supplicant
> Bluetooth:
>   Device-1: Foxconn / Hon Hai Wireless_Device driver: btusb v: 0.8 type: USB rev: 2.1
>     speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 5-7:3 chip-ID: 0489:e0e2 class-ID: e001
>     serial: <filter>
>   Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.2 lmp-v: 11 status:
>     discoverable: no pairing: no class-ID: 104
> Drives:
>   Local Storage: total: 7.28 TiB used: 841.51 GiB (11.3%)
>   SMART Message: Required tool smartctl not installed. Check --recommends
>   ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Corsair model: MP600 PRO XT size: 3.64 TiB
>     block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter>
>     fw-rev: EIFM31.6 temp: 49.9 C scheme: GPT
>   ID-2: /dev/nvme1n1 maj-min: 259:3 vendor: Western Digital model: WD BLACK SN850X 4000GB
>     size: 3.64 TiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 tech: SSD
>     serial: <filter> fw-rev: 624331WD temp: 39.9 C scheme: GPT
> Partition:
>   ID-1: / raw-size: 3.57 TiB size: 3.57 TiB (100.00%) used: 841.5 GiB (23.0%) fs: btrfs
>     dev: /dev/nvme1n1p2 maj-min: 259:5
>   ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 608 KiB (0.2%) fs: vfat
>     dev: /dev/nvme1n1p1 maj-min: 259:4
>   ID-3: /home raw-size: 3.57 TiB size: 3.57 TiB (100.00%) used: 841.5 GiB (23.0%) fs: btrfs
>     dev: /dev/nvme1n1p2 maj-min: 259:5
>   ID-4: /var/log raw-size: 3.57 TiB size: 3.57 TiB (100.00%) used: 841.5 GiB (23.0%) fs: btrfs
>     dev: /dev/nvme1n1p2 maj-min: 259:5
>   ID-5: /var/tmp raw-size: 3.57 TiB size: 3.57 TiB (100.00%) used: 841.5 GiB (23.0%) fs: btrfs
>     dev: /dev/nvme1n1p2 maj-min: 259:5
> Swap:
>   Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
>   ID-1: swap-1 type: zram size: 62.45 GiB used: 0 KiB (0.0%) priority: 100 comp: zstd
>     avail: lzo-rle,lzo,lz4,lz4hc,deflate,842 max-streams: 16 dev: /dev/zram0
>   ID-2: swap-2 type: partition size: 68.7 GiB used: 0 KiB (0.0%) priority: -2
>     dev: /dev/nvme1n1p3 maj-min: 259:6
> Sensors:
>   System Temperatures: cpu: 40.5 C mobo: N/A
>   Fan Speeds (rpm): N/A
> Info:
>   Memory: total: 64 GiB available: 62.45 GiB used: 1.7 GiB (2.7%)
>   Processes: 293 Power: uptime: 7m states: freeze,mem,disk suspend: deep avail: s2idle
>     wakeups: 0 hibernate: platform avail: shutdown, reboot, suspend, test_resume image: 24.91 GiB
>     Init: systemd v: 257 default: graphical tool: systemctl
>   Packages: pm: pacman pkgs: 0 tools: octopi,pamac,paru pm: flatpak pkgs: 0 Compilers: clang: 19
>     gcc: 14.2.1 Shell: garuda-inxi default: Bash v: 5.2.37 running-in: tty 2 inxi: 3.3.37
> Garuda ():
>   System install date:     2025-01-28
>   Last full system update: 2025-02-26
>   Is partially upgraded:   No
>   Relevant software:       snapper NetworkManager
>   Windows dual boot:       No/Undetected
>   Failed units:            lightdm.service 
lightdm.service

Which Garuda DE you use?
Try

paru -S libxml2

in TTY

2 Likes

im using cinnamon

paru giving me the same error:

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

Careful. Initially:

Then:

Most likely the latter.
In which case, the package to be installed is libxml2 from the Arch repos. So you should try:

sudo pacman -S libxml2

If you have trouble booting, or installing from the TTY, you could consider booting from a live USB and then chrooting into your installed system.

3 Likes

hey :slight_smile: i was able to get back into my system

Unfortunately i wasn´t able to test your command @filo saw that typo later :X yea

But how i fixed it:

I bootet into live-stick and had a quick look into /usr/lib/ and saw (compared to live-stick) these file where totally missing :X
So i tried to recover the snapshot from live stick which was working after i tried a few days older one
Recovery from grub wasn´t working

So now im back into system and snapshot recovery from live-usb did the job :slight_smile:

thanks a lot for your really quick response really appreciate it :slight_smile:

2 Likes

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