Arch Linux | How to repair yay

Small “repair” guide in case the package manager yay shows the following or a similar error:

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


If yay shows such a message, nothing works anymore, yay refuses the service. This can happen in particular if an Arch Linux-based distribution has not been updated for a long time.

Unfortunately, uninstalling and reinstalling yay via Pacman does not help in this case.

We have no choice but to “rebuild” yay from the sources.

Step 1: Remove yay

sudo pacman -R yay

Step 2: Clone source packages

We change to a temporary directory, e.g. /tmp and download the source packages from yay:

git clone https://aur.archlinux.org/yay.git

Step 3: Compile source packages

After downloading, we change to the new directory yay and start the “build process”:

cd yay
makepkg -si


Now yay should work properly again.

Step 4: Error: Cannot find the debugedit binary

It is possible that the debugedit package is missing for compiling.


Then simply use

sudo pacman -S debugedit

and carry out step 3 again.

4 Likes

Thanks for sharing this. Making me miss Arch!

2 Likes

Great guide! Rebuilding yay from source is definitely the way to go when running into that libalpm.so.14 issue, especially after long periods without updates. The debugedit tip is also a lifesaver—good call, including that for anyone compiling. Clear steps and very helpful!

2 Likes

Thank you @devdev. i have tested the steps several times on different systems. always with success.

2 Likes

Thanks @toadie for sharing this! it might be very usefoul!
-r

2 Likes