Yay installs and removals report: "Not an ELF file - it has the wrong magic bytes"

So recently I tried installing Teams from the aur:

yay -Syu teams

I realized the error of my ways (you can use teams from a web browser) so I uninstalled it:

yay -R teams

Now I am seeing the following messages every time I install or remove a package:

[russ@attitude ~]$ yay -R barrier
[sudo] password for russ:
checking dependencies…
Packages (1) barrier-2.3.3-1
Total Removed Size: 1.26 MiB
:: Do you want to remove these packages? [Y/n] y
:: Processing package changes…
(1/1) removing barrier >[----------------------------------------------------------------] 100%
ldconfig: /usr/lib/libMagickCore-7.Q16HDRI.so is not an ELF file - it has the wrong magic bytes at the start.
ldconfig: /usr/lib/libMagickCore-7.Q16HDRI.so.9.0.0 is not an ELF file - it has the wrong magic bytes at the start.
ldconfig: /usr/lib/libMagickCore-7.Q16HDRI.so.9 is not an ELF file - it has the wrong magic bytes at the start.
:: Running post-transaction hooks…
(1/3) Arming ConditionNeedsUpdate…
(2/3) Updating icon theme caches…
(3/3) Updating the desktop file MIME type cache…
[russ@attitude ~]$

Running file on these locations gives me the following output:

[russ@attitude ~]$ file /usr/lib/libMagickCore-7.Q16HDRI.so
/usr/lib/libMagickCore-7.Q16HDRI.so: symbolic link to libMagickCore-7.Q16HDRI.so.9.0.0
[russ@attitude ~]$ file /usr/lib/libMagickCore-7.Q16HDRI.so.9.0.0
/usr/lib/libMagickCore-7.Q16HDRI.so.9.0.0: data
[russ@attitude ~]$ file /usr/lib/libMagickCore-7.Q16HDRI.so.9
/usr/lib/libMagickCore-7.Q16HDRI.so.9: symbolic link to libMagickCore-7.Q16HDRI.so.9.0.0

How do I get rid of the yay output without wrecking libMagick, if I need that? TIA.

This could be because of a corrupt file or filesystem. Try reinstalling imagemagick, and also check your disk health.

You should probably also run pacman -Qkk to check whether there are any other corrupt files (you’d be looking for filesize or checksum mismatches).

4 Likes

I ran pacman -Syyu imagemagick and that seemed to do the trick. Results of the pacman -Qkk didn’t seem to be too scary…

So then I did sudo touch /forcefsck and rebooted the system and it ran an fsck and that didn’t stop to report any issues after running.

I believe everything is resolved. Thanks for the speedy help!

2 Likes

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