Can't start x: invalid ELF header

After running update, the libnghttp2 package was upgraded (to libnghttp2-1.55.0-1.

I couldn't start a graphical interface or use pacman, they both give the error:
error while loading shared libraries: /usr/lib/libnghttp2.so.14: invalid ELF header.
I couldn't find any useful similar threads on the internet.

I booted and restored a previous snapper snapshot.
How do I prevent the same error after the next upgrade?

Please help.

garuda-inxi output:

System:
  Kernel: 6.4.3-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=aeb3c7e0-45af-4344-ba3f-05339ad86d76 rw rootflags=subvol=@
    rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3 ibt=off
  Desktop: KDE Plasma v: 5.27.6 tk: Qt v: 5.15.10 info: latte-dock
    wm: kwin_x11 vt: 2 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: Gigabyte model: B550M DS3H AC v: x.x
    serial: <superuser required> UEFI: American Megatrends LLC. v: F15
    date: 07/29/2022
CPU:
  Info: model: AMD Ryzen 7 5800X bits: 64 type: MT MCP arch: Zen 3+ gen: 4
    level: v3 note: check built: 2022 process: TSMC n6 (7nm) family: 0x19 (25)
    model-id: 0x21 (33) stepping: 0 microcode: 0xA201016
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
    L3: 32 MiB desc: 1x32 MiB
  Speed (MHz): avg: 3709 high: 3800 min/max: 2200/4850 boost: enabled
    scaling: driver: acpi-cpufreq governor: performance cores: 1: 3594 2: 3600
    3: 3800 4: 3800 5: 3800 6: 3800 7: 3800 8: 3800 9: 3587 10: 3586 11: 3800
    12: 3800 13: 3592 14: 3800 15: 3610 16: 3583 bogomips: 121372
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities: <filter>
Graphics:
  Device-1: NVIDIA TU116 [GeForce GTX 1650 SUPER] vendor: ASUSTeK
    driver: nvidia v: 535.54.03 alternate: nouveau,nvidia_drm non-free: 535.xx+
    status: current (as of 2023-07) arch: Turing code: TUxxx
    process: TSMC 12nm FF built: 2018-22 pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 06:00.0 chip-ID: 10de:2187 class-ID: 0300
  Device-2: Lenovo FHD Webcam driver: snd-usb-audio,uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 5-1:2 chip-ID: 17ef:4831
    class-ID: 0102 serial: <filter>
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2
    compositor: kwin_x11 driver: X: loaded: nvidia gpu: nvidia display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 3840x1080 s-dpi: 80 s-size: 1219x343mm (47.99x13.50")
    s-diag: 1266mm (49.86")
  Monitor-1: DP-0 pos: right res: 1920x1080 hz: 60 dpi: 82
    size: 598x336mm (23.54x13.23") diag: 686mm (27.01") modes: N/A
  Monitor-2: DVI-D-0 pos: primary,left res: 1920x1080 hz: 60 dpi: 82
    size: 598x336mm (23.54x13.23") diag: 686mm (27.01") modes: N/A
  Monitor-3: HDMI-0 size-res: N/A modes: N/A
  API: OpenGL v: 4.6.0 NVIDIA 535.54.03 renderer: NVIDIA GeForce GTX 1650
    SUPER/PCIe/SSE2 direct-render: Yes
Audio:
  Device-1: NVIDIA TU116 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 06:00.1 chip-ID: 10de:1aeb class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: Gigabyte
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 08:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: Lenovo FHD Webcam driver: snd-usb-audio,uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 5-1:2 chip-ID: 17ef:4831
    class-ID: 0102 serial: <filter>
  API: ALSA v: k6.4.3-zen1-1-zen status: kernel-api tools: N/A
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 0.3.73 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 04:00.0
    chip-ID: 8086:24fb class-ID: 0280
  IF: wlo1 state: down mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Gigabyte driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: f000 bus-ID: 05:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Intel Wireless-AC 3168 Bluetooth driver: btusb v: 0.8 type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-9:4 chip-ID: 8087:0aa7
    class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
  Local Storage: total: 476.94 GiB used: 468.36 GiB (98.2%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Intel model: SSDPEKNW512G8
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 002C temp: 57.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 476.64 GiB size: 476.64 GiB (100.00%)
    used: 468.36 GiB (98.3%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 576 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 476.64 GiB size: 476.64 GiB (100.00%)
    used: 468.36 GiB (98.3%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 476.64 GiB size: 476.64 GiB (100.00%)
    used: 468.36 GiB (98.3%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 476.64 GiB size: 476.64 GiB (100.00%)
    used: 468.36 GiB (98.3%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.52 GiB used: 1.91 GiB (12.3%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 71.6 C mobo: N/A gpu: nvidia temp: 46 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 27%
Info:
  Processes: 377 Uptime: 14m wakeups: 0 Memory: total: 16 GiB
  available: 15.52 GiB used: 6.34 GiB (40.9%) Init: systemd v: 253
  default: graphical tool: systemctl Compilers: gcc: 13.1.1 clang: 15.0.7
  Packages: 2271 pm: nix-default pkgs: 0 pm: nix-sys pkgs: 0 pm: nix-usr
  pkgs: 0 pm: pacman pkgs: 2270 libs: 472
  tools: gnome-software,octopi,pamac,paru,yay pm: flatpak pkgs: 1 Shell: Zsh
  v: 5.9 running-in: dolphin inxi: 3.3.28
Garuda (2.6.16-1):
  System install date:     2022-01-29
  Last full system update: 2023-07-10
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager mkinitcpio nvidia-dkms
  Windows dual boot:       No/Undetected
  Failed units:            

Here’s an older, SOLVED post in the Arch Forums that may or may not be helpful. (I did a Google search on the exact error message. About 695 results (0.52 seconds))
:smiley:
https://bbs.archlinux.org/viewtopic.php?id=76257

DON’T PANIC

It’s not like you broke the interwebs or something. :slight_smile:

1 Like

Try updating again. Maybe something went wrong with that package the first time.
There is no relevant bug report both in Arch and upstream.

garuda-update 

should help you also refreshing your mirrors.

:grimacing: I progressively edited my post to get more and more dramatic. The first iteration was just the error.

I’m a newbie, sorry. Can you link the post please?
I googled that too, no arch forums post?

No results for the exact error on the Arch Forums search:

Will do, thanks.

Aren’t update and garuda-update the same?

Yes.
I normally specify the long name because some people by simply update mean sudo pacman -Syu

2 Likes

@Bro you forgot to post the link! :face_with_hand_over_mouth:

Fixed, thanks. :smiley:

And there are many more hits besides.
:smiley:

2 Likes

Worked, thanks a lot @filo @Bro !

2 Likes

Many, many times a Linux solution is found in something as simple as updating and/or rebooting.
Linux solutions can be just that simple...or not. See "Occam's Razor."

I've got maybe 10-12 sure fire, solid solutions that work rain or shine. I'd bet @filo does, too. After that, it's just doing a little research.

But the #1 troubleshooting tool is:

image

3 Likes

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