How to Fix yay: error while loading shared libraries: libalpm.so.12

1 min


This quick guide is to help you to fix yay error – while loading shared libraries: libalpm.so.12.

If you are running Arch Linux in a system for longer, things can break due to its rolling release nature combined with your hardware support. If you use the AUR Helper Yay, then sometimes, yay can be corrupted due to several installations upgrades of other packages.

The YAY helper is very stable, but sometimes it gets messed up, and you can not do any installation using it until you fix it. And one of the nagging errors is this:

yay: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory

This error particularly comes after upgrading to pacman 6.0 due to incompatibility of shared libraries.

error while loading shared libraries - yay
error while loading shared libraries – yay

How to fix yay error – while loading shared libraries: libalpm.so.12

  • This error can only be fixed by uninstalling yay completely, including its dependencies.
  • Then re-installing yay.
  • There is no other way to solve this error.
  • We already have a guide how to install Yay, however, here are the steps to fix.
  • Clone the yay repo from AUR and build. Run the following command in sequence from a terminal window.
cd /tmp
git clone 'https://aur.archlinux.org/yay.git'
cd /tmp/yay
makepkg -si
cd ~
rm -rf /tmp/yay/

After installation, you can try running the command which gave you this error. And you should be all set. If you still have this error, let me know in the comment box below.

Many people have encountered this, and several discussions happened across the web. Above is the only solution to this error. And I could not find the exact root cause of the problem anywhere except it started after pacman 6.0 update.


We bring the latest tech, software news and stuff that matters. Stay in touch via Telegram, Twitter, YouTube, and Facebook and never miss an update!

Join our Telegram channel and stay informed on the move.


Arindam

Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email.
Subscribe
Notify of
guest

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

2 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
2
0
Would love your thoughts, please comment.x
()
x