Even though I’ve been using Arch Linux for a few years now, from time to time, I do run into small issues that are unique to Arch.
One such issue happened when I was trying to upgrade my system, only to be
blocked immediately with some sort of dependency mis-match between
my favorite Arch User Repository installer of the moment,
Incidentally, I ran into this a while back, resolved it, and then forgot to write a post about it. Fortunately, when I went to upgrade my old laptop, that was over 700 packages behind, I ran into the same thing.
The full error message I was receiving when running
yay -Syu was:
error: failed to prepare transaction (could not satisfy dependencies) :: installing pacman (5.2.1-1) breaks dependency 'pacman<5.1.3' required by yay
As mentioned, this is a weird chicken and egg scenario where
yay requires a
certain version of
pacman and the system wants to upgrade
pacman to a newer
yay blocks the upgrade because it would break it’s own
I found some unique solutions out there to try to work around this, but since
it’s not very frequent of an issue, seeing as I only ran into it once in many
years, it seemed like the best solution would be to simply remove
upgrade, then install
So that’s what I did.
Except this time around, I also ran into a similar issue with some other packages:
error: failed to prepare transaction (could not satisfy dependencies) :: installing xorgproto (2019.2-2) breaks dependency 'dmxproto' required by libdmx :: installing xorgproto (2019.2-2) breaks dependency 'xfdgaproto' required by liblibxxf86dga
Before I could worry about getting
yay playing nicely again, I
had to correct the aforementioned issues, by doing the following, which was
posted in the latest news on archlinux.org:
su -c 'pacman -Rdd libdmx libxxf86dga'
After running that, I was able to run the following to remove
yay, upgrade the
system and then re-install
yay manually from the Arch User Repository:
yay -R yay.
- Upgrade the system using
su -c 'pacman -Syu'.
- Grab the latest
curl -OJ 'https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yay'.
- Build the package and install it by running
Not much to it, and more than likely the last two commands are probably in your
shell history since they are the same steps to install
yay on a system without
a wrapper for the Arch User Repository already installed.
Worth noting, there was a clever solution where you install
yay-bin which gets
you a pre-compiled version of
yay. Nothing wrong with that solution, but I
didn’t want to introduce another package when I didn’t have to.