Removing AUR package (could not satisfy dependencies)

Ok, this post definitely belongs in newbie lol. I’m still learning how to deal with these scenarios, as it’s not a common one I cross paths with.

I was trying to install libheif on my Arch system to view .HEIC images, and couldn’t remember how I got it working on my other EOS machine. I installed it via yay -S libheif and that was not enough to get it working, so I tried to remove it before trying other methods and I ran into:

[user@Arch ~]$ yay -R libheif
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing libheif breaks dependency 'libheif' required by gd
:: removing libheif breaks dependency 'libheif' required by gimp
 -> exit status 1

I tried to mark the dependencies as explicitly installed before attempting to remove the AUR again, but that also didn’t work, as there were other chained dependencies.

Little confused here.

Are you sure that didn’t just reinstall it? Can you still see the terminal output?

If not look at the date of the file in your pacman cache.

1 Like

libheif is a required dependency of both gd and gimp and is in the official Arch’s repos and not in AUR.

For example:

pacman -Qi gd | grep Depends 
Depends On      : fontconfig  libxpm  libwebp  libavif  libheif

So as mentioned above, you may just have reinstalled it.

Look at the last lines of:

grep libheif /var/log/pacman.log

2 Likes

You can check if a package is in the AUR:

yay -Sia "name-of-a-package"   # note the "a" after "-Si"

Also, a package included in the repos listed in /etc/pacman.conf is found with:

pacman -Si "name-of-a-package"
# or
expac -S %n "name-of-a-package"
2 Likes

A bit more related stuff: you can check if a package is installed on your system with:

pacman -Q "name-of-a-package"
expac "%n %v" "name-of-a-package"

Both of these commands show the same information if the package is installed.

1 Like
[user@Arch ~]$ grep libheif /var/log/pacman.log
[2024-07-07T16:38:23+0000] [ALPM] installed libheif (1.17.6-6)
[2024-07-08T04:50:19-0700] [PACMAN] Running 'pacman -S --config /etc/pacman.conf -- extra/libheif'
[2024-07-08T04:50:22-0700] [ALPM] reinstalled libheif (1.17.6-6)
[2024-07-08T04:50:22-0700] [PACMAN] Running 'pacman -D -q --asdeps --config /etc/pacman.conf -- libheif'
[2024-07-08T04:52:20-0700] [PACMAN] Running 'pacman -R -n -s --config /etc/pacman.conf -- libheif'
[2024-07-08T04:52:35-0700] [PACMAN] Running 'pacman -R -n --config /etc/pacman.conf -- libheif'
[2024-07-08T04:58:55-0700] [PACMAN] Running 'pacman -R -n --config /etc/pacman.conf -- libheif'
[2024-07-08T05:01:56-0700] [PACMAN] Running 'pacman -R --config /etc/pacman.conf -- libheif'

Yeah, I should’ve done that first, but I was just under the impression I didn’t have it installed, since the .HEIC images aren’t viewable in gwenview.

[user@Arch ~]$ yay -Sia libheif
[user@Arch ~]$ pacman -Si libheif
Repository      : extra
Name            : libheif
Version         : 1.17.6-6
Description     : An HEIF and AVIF file format decoder and encoder
Architecture    : x86_64
URL             : https://github.com/strukturag/libheif
Licenses        : GPL3
Groups          : None
Provides        : None
Depends On      : aom  gcc-libs  glibc  libde265  libwebp  x265
Optional Deps   : libjpeg: for heif-convert and heif-enc
                  libpng: for heif-convert and heif-enc
                  dav1d: dav1d encoder
                  ffmpeg: hardware decode
                  rav1e: rav1e encoder
                  svt-av1: svt-av1 encoder
Conflicts With  : None
Replaces        : None
Download Size   : 372.46 KiB
Installed Size  : 1226.51 KiB
Packager        : Antonio Rojas <arojas@archlinux.org>
Build Date      : Mon 20 May 2024 11:43:55 PM PDT
Validated By    : SHA-256 Sum  Signature

So it doesn’t appear to be in the AUR despite “reinstalling” it from the AUR.

Shows in pacman output, which is a good sign I suppose.

Are the dependencies correct here, or did I change it from the default?

Before making this post I tried sudo pacman -D --asexplicit gimp gd and then to reverse it I ran sudo pacman -Rns gimp gd. Am I good?

Does this essentially mean nothing has changed, and I can just carry on as if I never installed the AUR? I still need to get the .HEIC images to load.

There seems to be some misunderstanding regarding the functioning of yay.

yay is not only an AUR helper targeting packages in AUR. It is also a pacman wrapper meaning it is capable of operating on the packages from Arch’s repos as well.

So, when you run yay -S X, if X is from Arch’s repo, it will be installed from there.

3 Likes

That one flew over my head. I didn’t pay attention to the -S in the yay command, in fact that’s the first time I’ve added -S to yay, but that makes sense now. Thanks for pointing that out.

That being said, I’m still not sure how to get the HEIC images to load.

What application are you trying to use to view them?

1 Like

gwenview is my default

That also requires kimageformats to be installed I believe.

3 Likes

Thanks. That did the trick.

You always come through :saluting_face:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.