OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
omarchy-core high common DISPUTE

Fix yay failing with a libalpm.so shared library error

omarchyarchendeavouroscachyosmanjaro
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

The failure mode is real and yay is still shipped (install/omarchy-base.packages lists yay). But the primary fix sudo pacman -Syu is now BLOCKED on Omarchy by bin/omarchy-update-pacman-guard, so the record's first command fails outright. The premise is also overstated: omarchy update is not deadlocked by a broken yay, because bin/omarchy-update runs omarchy-update-system-pkgs (pacman) first and omarchy-update-aur-pkgs (yay) last, and omarchy-update-aur-pkgs is skipped entirely unless pacman -Qem reports foreign packages. Additionally yay-bin conflicts with/provides yay, so makepkg -si will prompt to replace the installed yay, and makepkg must not be run as root. Neither is mentioned.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

Do not pacman -Sy a single package to "fix" this, because that deepens the partial upgrade. Always use a full -Syu.

Symptom

After an interrupted or manual upgrade, every AUR command dies instantly with:


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

omarchy update then fails too, because it shells out to yay. Users describe it as "deadlocked. I can't update because the updater is broken."

Cause

Classic partial upgrade. pacman was upgraded (bumping libalpm's soname, e.g. .so.14 -> .so.15) but yay, which links against libalpm, was not upgraded in the same transaction. Usually caused by pacman -Sy <pkg>, a Ctrl-C'd transaction, or an update that aborted after pacman but before yay.

Fix

pacman itself still works. On Omarchy, a bare pacman -Syu is stopped by the update guard, so either run the normal updater (preferred, because it upgrades system packages with pacman before it ever touches yay):


omarchy update

or, if you need pacman directly for this one transaction:


sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 pacman -Syu

Either one pulls the rebuilt yay and the soname mismatch goes away. Confirm:


yay --version

Only if yay is still broken (its repo build genuinely lags the new libalpm) fall back to the prebuilt yay-bin. Run makepkg as your normal user, never with sudo. yay-bin conflicts with yay, so pacman will ask to replace it. Answer yes:


sudo pacman -S --needed git base-devel
cd /tmp
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg -si          # as your user; accepts replacing yay with yay-bin

Then resume the normal path:


omarchy update

Verify

yay --version prints a version instead of the loader error, and omarchy update runs to completion.

Sources

yay-libalpm-shared-library-error