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.

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