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

#arch linux #linux #cli

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

This error can only be fixed by reinstalling yay. There is no other way to solve this error.

  1. Remove yay:
pacman -R yay
  1. Make a new directory and clone the yay repository
git clone https://aur.archlinux.org/yay.git && cd yay
  1. Build and install yay:
makepkg -si

After installation, you can use yay as usual.