How To Fix “pacman: error while loading shared libraries” Error In Arch Linux

pacman: error while loading shared libraries

10 Responses

  1. Hannes Philipp says:

    Thank you very much! That saved me a lot of time… 🙂 After not having upgraded for 3 months, ignoring unresolvable package version conflicts rendered me libidn2-less. Now everything works fine again. Remark: on my computer, even wget needs libidn2… so that line did unfortunately not work for me 😀

  2. Gideon van der Merwe says:

    Thanks ! I had a similar issue once before and had to chroot with a live arch disc a few times to solve it. Glad I cam upon this post, but reading through your post, it makes a lot of sense.

  3. I did “sudo ln -s /usr/lib/libidn2.so /usr/lib/libidn2.so.0”!

  4. Chris says:

    By the way, for anyone who breaks pacman, fixing it manually is pretty tedious, you can also use pacman-static (available on the AUR, with precompiled downloads) to fix your broken install. It has no library dependencies whatsoever and so will work whatever the state of libraries on your system is.

  5. racosa says:

    Thank you very much for posting this 🙂

  6. Den says:

    I had the file located where it should be but still there was that error. So I re-downloaded the package and copied it to the dir. Then everything works again! 🙂

  7. Aaroncio says:

    Thanks. you saved me.
    The link is broken, but I found the packages here https://fraggod.net/static/mirror/packages/archlinux/x86_64/
    downloading libidn2-2.0.5-1-x86_64.pkg.tar.xz for libidn2.so.0 and libidn2-2.1.0-1-x86_64.pkg.tar.xz for libidn2.so.4

  8. Mike says:

    This was much easier to fix for me.

    ls -la /usr/lib/libidn2*
    lrwxrwxrwx 1 root root 16 Feb 10 21:11 /usr/lib/libidn2.so -> libidn2.so.0.3.5
    lrwxrwxrwx 1 root root 16 Feb 10 21:11 /usr/lib/libidn2.so.0 -> libidn2.so.0.3.5
    -rwxr-xr-x 1 root root 120512 Feb 10 21:11 /usr/lib/libidn2.so.0.3.5

    cd /usr/lib
    sudo ln -s libidn2.so libidn2.so.4

    And then pacman/yay worked.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.