6

Recently I upgraded Ubuntu to the 20.04 version. Unfortunately, after the upgrade, the problems with Imagemagick appeared.

$ magick
magick: error while loading shared libraries: libIlmImf-2_2.so.22: cannot open shared object file: No such file or directory

The same errors with libIlmImf is returned when use identify or convert command. As an inexperienced user of Ubuntu, I think I could mess something up with packages trying to solve it.

apt list --installed | grep magick

graphicsmagick/focal,now 1.4+really1.3.35-1 amd64 [installed,auto-removable]
imagemagick-6-common/focal-updates,focal-updates,focal-security,focal-security,now 8:6.9.10.23+dfsg-2.1ubuntu11.1 all [installed,automatic]
imagemagick-6.q16/focal-updates,focal-security,now 8:6.9.10.23+dfsg-2.1ubuntu11.1 amd64 [installed]
libgraphicsmagick-q16-3/focal,now 1.4+really1.3.35-1 amd64 [installed,auto-removable]
libmagickcore-6.q16-6-extra/focal-updates,focal-security,now 8:6.9.10.23+dfsg-2.1ubuntu11.1 amd64 [installed,automatic]
libmagickcore-6.q16-6/focal-updates,focal-security,now 8:6.9.10.23+dfsg-2.1ubuntu11.1 amd64 [installed,automatic]
libmagickwand-6.q16-6/focal-updates,focal-security,now 8:6.9.10.23+dfsg-2.1ubuntu11.1 amd64 [installed,automatic]

which magick
/usr/local/bin/magick

Grepping libIlmImf also returns different versions that are expected:

ls /usr/lib/x86_64-linux-gnu/ | grep libIlmImf

libIlmImf-2_3.so.24
libIlmImf-2_3.so.24.0.0
libIlmImf.a
libIlmImf.so
libIlmImfUtil-2_3.so.24
libIlmImfUtil-2_3.so.24.0.0
libIlmImfUtil.a
libIlmImfUtil.so

Does anyone encounter issues with Imagemagick after the upgrade? Do you have some suggestions that may help me?

mizinsky
  • 161
  • 2
  • 10
  • 5
    Looks like your `libIlmImf` is one minor version newer than the one **ImageMagick** wants. I would make a backup first, then try uninstalling and reinstalling **ImageMagick**. If that doesn't help, you could try using the package manager to install v2.2 of Ilm and then reinstalling **ImageMagick**, or you could see if you get lucky by making a symlink in `/usr/lib/x86_64-linux-gnu` with `ln -s libIlmImf-2_3.so.24 libIlmImf-2_2.so.22` Good luck! – Mark Setchell Nov 09 '20 at 09:09

3 Answers3

5

As Mark Setchell wrote

Looks like your libIlmImf is one minor version newer than the one ImageMagick wants

Unfortunately, I could not install packages in lower versions because of dependencies and I did not try making a symlink.

But I get it running by downloading older packages from ubuntuupdates

libopenexr22 libilmbase

Then I copied these files to /usr/lib/x86_64-linux-gnu/ and now all commands: identify, convert and magick works good.

mizinsky
  • 161
  • 2
  • 10
5

Thank you @mark-setchell! Symlink works in my case!

cd /usr/lib/x86_64-linux-gnu/
ln -s libIlmImf-2_3.so.24 libIlmImf-2_2.so.22
Liam
  • 19,819
  • 24
  • 83
  • 123
Alexey Zalyotov
  • 326
  • 2
  • 5
  • 16
0

This problem came up when I updated the Heroku stack from Ubuntu 18 to 20. Given that I cannot download new packages or create symlinks, what fixed it for me was using the HiMamaInc buildpack

AresL
  • 1