2

After upgrading from 22.04 to 24.04 the ImageMagick commands don't run.

$ convert --version
convert: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory
$ magick --version
magick: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory

I followed the solution in Major software missing after 24.04.1 LTS upgrade (sudo apt update && sudo apt full-upgrade), but that did not resolve the symptom.

Here is my package listing

dpkg -l | grep magick
ii  imagemagick                                        8:6.9.12.98+dfsg1-5.2build2              amd64        image manipulation programs -- binaries
ii  imagemagick-6-common                               8:6.9.12.98+dfsg1-5.2build2              all          image manipulation programs -- infrastructure
ii  imagemagick-6.q16                                  8:6.9.12.98+dfsg1-5.2build2              amd64        image manipulation programs -- quantum depth Q16
rc  libimage-magick-perl                               8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5+esm1 all          Perl interface to the ImageMagick graphics routines
ii  libmagick++-6.q16-9t64:amd64                       8:6.9.12.98+dfsg1-5.2build2              amd64        C++ interface to ImageMagick -- quantum depth Q16
ii  libmagickcore-6-arch-config:amd64                  8:6.9.12.98+dfsg1-5.2build2              amd64        low-level image manipulation library - architecture header files
ii  libmagickcore-6-headers                            8:6.9.12.98+dfsg1-5.2build2              all          low-level image manipulation library - header files
ii  libmagickcore-6.q16-7-extra:amd64                  8:6.9.12.98+dfsg1-5.2build2              amd64        low-level image manipulation library - extra codecs (Q16)
ii  libmagickcore-6.q16-7t64:amd64                     8:6.9.12.98+dfsg1-5.2build2              amd64        low-level image manipulation library -- quantum depth Q16
ii  libmagickwand-6-headers                            8:6.9.12.98+dfsg1-5.2build2              all          image manipulation library - headers files
ii  libmagickwand-6.q16-7t64:amd64                     8:6.9.12.98+dfsg1-5.2build2              amd64        image manipulation library -- quantum depth Q16

Interestingly, the file libtiff.so.5 does appear in some Gnome snaps.

$ locate libtiff.so.5
/snap/gnome-3-38-2004/143/usr/lib/x86_64-linux-gnu/libtiff.so.5
/snap/gnome-3-38-2004/143/usr/lib/x86_64-linux-gnu/libtiff.so.5.5.0
/snap/gnome-42-2204/176/usr/lib/x86_64-linux-gnu/libtiff.so.5
/snap/gnome-42-2204/176/usr/lib/x86_64-linux-gnu/libtiff.so.5.7.0

Any way to restore the ImageMagick commands?

Thank you.

  • 1
    AFAIK 24.04 uses libtiff6 - are you sure that convert is invoking the version from the installed imagemagick-6.q16 package? Could it be finding an older (perhaps built from source, or installed from a PPA) version? What does type -a convert report? – steeldriver Sep 08 '24 at 01:50
  • convert is /usr/local/bin/convert convert is /usr/bin/convert convert is /bin/convert

    I'll give Archisman's solution a try now.

    – TurkishCoffee Sep 08 '24 at 02:42
  • ... so my guess is /usr/bin/convert --version will work as expected - the version in /usr/local/bin is likely older and requires the (now absent - since upgrading) libtiff5 dynamic library – steeldriver Sep 08 '24 at 08:57

3 Answers3

0

First, try reinstalling imagemagick

sudo apt remove imagemagick
sudo apt update
sudo apt install imagemagick

(Note, removing imagemagick may remove other software like gimp, and you will have to install them manually).

If that did not work, try installing libtiff manually. Open a terminal and enter the following command.

sudo apt install libtiff5-dev libtiff-dev
  • Archisman, thank you once again for your response.

    I tried the first three commands, and they all completed successfully. (Gimp was not removed.)

    Symptom remained. I then tried sudo apt install libtiff5-dev libtiff-dev, and got the response libtiff5-dev is already the newest version (4.5.1+git230720-4ubuntu2.1). libtiff-dev is already the newest version (4.5.1+git230720-4ubuntu2.1).

    – TurkishCoffee Sep 08 '24 at 02:48
  • Sorry. My upgrade was successful (I upgraded many months ago), and it has libtiff installed, so I thought it would work. Let's wait for other people to answer – Archisman Panigrahi Sep 08 '24 at 02:51
0

Even after removing imagemagick as Archisman suggested, I still had an executable. For example, type -a convert showed there was an executable in /usr/local/bin/convert. That was a hint that maybe I had built and installed IM from source at one time.

I downloaded the ImageMagick source, ran sudo make uninstall. That cleared out the stray executables. After that I proceeded with sudo apt update && sudo apt install imagemagick, and everything is now operational.

0

None of these solutions worked for me thus, I'm sharing what actually helped me. Simply install this version of pillow:

pip install pillow==10.4.0

Everything should work fine after that step.