I installed ImageMagick 7.0.8-11 Q16 x86_64 from source, and I didn't know that decode delegates are not automatically included when installing from source. I should have installed a binary of ImageMagick, which includes the jpeg decode delegate. The problem is that I can't uninstall ImageMagick because many other programs depend on it. So is there a way for me to install the jpeg decode delegate for the existing ImageMagick installation?

Relevant information:

Linux Mint 19 Tara 64bit.

apt-cache policy imagemagick
Installed: (none)
Candidate: 8:
Version table:
8: 500
500 http://mirror.atlantic.net/ubuntu bionic-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
8: -1
100 /var/lib/dpkg/status
8: 500
500 http://mirror.atlantic.net/ubuntu bionic/main amd64 Packages

identify -version
Version: ImageMagick 7.0.8-11 Q16 x86_64 2018-09-18 https://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: https://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): fontconfig freetype png x zlib

Is this AskUbuntu post related to your issue? If so you can follow this advice:

Install JPEG Encoding Library

Following the information provided by user Samir Sabri in this AskUbuntu post, you will need to add the JPEG library.

I fixed the problem by installing from source the jpeg encoding library available at http://www.ijg.org/files/jpegsrc.v8c.tar.gz. (Latest JPEG Library can be found here.)

cd /usr/local/src
tar xvfz jpegsrc-v9c.tar.gz
cd jpegsrc.v9c
./configure --enable-shared --prefix=$CONFIGURE_PREFIX
sudo make install

Then I re-installed ImageMagick from source:

cd /usr/local/src
tar xvfz ImageMagick-[yourImagemagickVersion].tar.gz
cd ImageMagick-[yourImagemagickVersion]
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
./configure --prefix=/usr/local \
  --disable-static --with-modules \
  --without-perl \
  --without-magick-plus-plus \
  --with-quantum-depth=8 \
 sudo make install

Substitute your options if necessary. You should be able to now use imagemagick to identify, encode, and decode jpeg files.

Uninstall and Reinstall

If the above post is not related or does not work the best course of action would be to uninstall imagemagick and install it again.

You can uninstall a package that you installed from source following the advice in this post by user Javier Rivera.

cd into the directory of the source package and run:

make uninstall

You may need root(sudo) permissions if that is how you built the package initially.

As user Javier Rivera points out, this will only work if the developer(s) of the source package have made uninstall scripts/rules. If they did not you will need to run make -n install to figure out the install steps and attempt to gracefully undo them.

You may also attempt to uninstall the package via dpkg by following the advice outlined in this post.

dpkg -r --force-depends foo

Will uninstall package foo while maintaining the packages that depend on foo. However this will create an unstable system. It would be advised to run apt-get -f install to help sort this out and pay attention to the output.

Looking at your apt-cache policy output you should be able to install a version of imagemagick from your repositories.

I recommend that you try to only install packages via your package manager. This makes it easier to manage your system and should work to avoid situations like this.

Please comment if you have any questions or issues with this answer. I highly suggest you read through each link I have provided thoroughly before attempting the commands. I appreciate feedback to correct any misconceptions and to improve my posts. I can update my answer as needed.

Best of Luck!

  • I've followed the directions up to the point that I'm to re-install ImageMagick from source. Everything goes well until I get to the make step, and then I get this error: root@koipty-Surface-Pro-2:/usr/local/src/ImageMagick-7.0.8-27# make make: *** No targets specified and no makefile found. Stop. – user8547 Feb 16 at 0:05
  • Is there a makefile in your current path? When you ran the ./configure step as specified in the official documentation it should create the makefile. – kemotep Feb 16 at 1:22
  • There are two files with "make" in the title, Makefile.am and Makefile.in. – user8547 Feb 16 at 12:24
  • @user8547 too be clear, you ran the configure script and the output created those makefiles? Is there a reason you need this version of Imagemagick and not the one found in your repos? If you do not use APT to manage your packages you will need to configure from source every time you want to update... – kemotep Feb 16 at 14:42
  • Yes, the configure step ran fine. I tried to find 7.08.11, but it's not in the repository: imagemagick.org/download/releases. I'd rather use APT, but isn't that too late, since I already installed it from source? – user8547 Feb 16 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.