Search code examples
imagemagickubuntu-20.04

Problem with Imagemagick after upgrading Ubuntu to 20.04


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?


Solution

  • 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.