How To install ImageMagick from source on centos 7
To install ImageMagick from source on centos 7
ImageMagick is a simple open source software suited for any image manipulation, which is used for editing, converting, creating, displaying image files. It can read and also write many image files like JPEG, GIF, PNG, TIFF and Photo CD image formats. It can be used for thumbnail and captcha creation. ImageMagick includes command line options for generating transparent and animated gif image formats and also features like sharpen, resize, rotate and adding special effects to an image. This video covers the method to install ImageMagick from source on CentOS 7
Installing ImageMagick
First make sure you download a package of imagick by making use of the following command.
[root@linuxhelp11 ~]# wget https://www.imagemagick.org/download/ImageMagick.tar.gz
--2018-03-23 20:26:55-- https://www.imagemagick.org/download/ImageMagick.tar.gz
Resolving www.imagemagick.org (www.imagemagick.org)... 198.72.81.86
Connecting to www.imagemagick.org (www.imagemagick.org)|198.72.81.86|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13007225 (12M) [application/x-gzip]
Saving to: ‘ ImageMagick.tar.gz’
100%[=============================================> ] 13,007,225 1.02MB/s in 16s
2018-03-23 20:27:12 (798 KB/s) - ‘ ImageMagick.tar.gz’ saved [13007225/13007225]
And then, you need to extract the downloaded file by using the following command.
[root@linuxhelp11 ~]# tar -xvf ImageMagick.tar.gz
ImageMagick-7.0.7-27/
ImageMagick-7.0.7-27/aclocal.m4
ImageMagick-7.0.7-27/LICENSE
ImageMagick-7.0.7-27/m4/
ImageMagick-7.0.7-27/m4/lt~obsolete.m4
ImageMagick-7.0.7-27/m4/ltoptions.m4
ImageMagick-7.0.7-27/m4/pkg.m4
ImageMagick-7.0.7-27/m4/libtool.m4
ImageMagick-7.0.7-27/m4/ax_append_flag.m4
ImageMagick-7.0.7-27/m4/framework.m4
ImageMagick-7.0.7-27/m4/ax_cflags_warn_all.m4
ImageMagick-7.0.7-27/m4/ax_c___attribute__.m4
ImageMagick-7.0.7-27/m4/ax_cxx_namespaces.m4
ImageMagick-7.0.7-27/m4/ax_compare_version.m4
ImageMagick-7.0.7-27/m4/ld-version-script.m4
ImageMagick-7.0.7-27/m4/ax_compiler_vendor.m4
.
.
ImageMagick-7.0.7-27/utilities/montage.1.in
ImageMagick-7.0.7-27/utilities/magick-script.1.in
ImageMagick-7.0.7-27/utilities/mogrify.1.in
ImageMagick-7.0.7-27/utilities/display.1
ImageMagick-7.0.7-27/configure
ImageMagick-7.0.7-27/Platforms.txt
you need to enter into extracted directory.
root@linuxhelp11 ~]# cd ImageMagick-7.0.7-27/
Now, configure imagick using following command.
[root@linuxhelp11 ImageMagick-7.0.7-27]# ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID ' 0' is supported by ustar format... yes
checking whether GID ' 0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... (cached) yes
configuring ImageMagick 7.0.7-27
checking whether build environment is sane... yes
checking for data-style of include used by make... GNU
,
,.
.
X11 Configuration:
X_CFLAGS =
X_PRE_LIBS =
X_LIBS =
X_EXTRA_LIBS =
Options used to compile and link:
PREFIX = /usr/local
EXEC-PREFIX = /usr/local
VERSION = 7.0.7
CC = gcc -std=gnu99 -std=gnu99
CFLAGS = -fopenmp -g -O2 -Wall -mtune=core-avx-i -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
CPPFLAGS = -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
PCFLAGS =
DEFS = -DHAVE_CONFIG_H
LDFLAGS =
LIBS =
CXX = g++
CXXFLAGS = -g -O2 -pthread
FEATURES = DPC HDRI Cipher OpenMP
DELEGATES = mpeg ps
Once it is done, you need to compile the program using the following command.
[root@linuxhelp11 ImageMagick-7.0.7-27]# make
make all-am
make[1]: Entering directory `/root/ImageMagick-7.0.7-27'
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-accelerate.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-animate.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-annotate.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-artifact.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-attribute.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-blob.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-cache.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-cache-view.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-channel.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-cipher.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-client.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-coder.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-color.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-colormap.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-colorspace.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-compare.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-composite.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-compress.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-configure.lo
CC MagickCore/MagickCore_libMagickCore_7_Q16HDRI_la-constitute.lo
.
.
.
cp -f MagickCore/ImageMagick.pc MagickCore/ImageMagick-7.Q16HDRI.pc
cp -f MagickCore/MagickCore.pc MagickCore/MagickCore-7.Q16HDRI.pc
cp -f MagickWand/MagickWand.pc MagickWand/MagickWand-7.Q16HDRI.pc
cp -f Magick++/lib/Magick++.pc Magick++/lib/Magick++-7.Q16HDRI.pc
make[1]: Leaving directory `/root/ImageMagick-7.0.7-27'
Now, you should install imagick by making use of the following command.
[root@linuxhelp11 ImageMagick-7.0.7-27]# make install
make install-am
make[1]: Entering directory `/root/ImageMagick-7.0.7-27'
make[2]: Entering directory `/root/ImageMagick-7.0.7-27'
/usr/bin/mkdir -p ' /usr/local/lib'
/bin/sh ./libtool --mode=install /usr/bin/install -c MagickCore/libMagickCore-7.Q16HDRI.la MagickWand/libMagickWand-7.Q16HDRI.la Magick++/lib/libMagick++-7.Q16HDRI.la ' /usr/local/lib'
libtool: install: /usr/bin/install -c MagickCore/.libs/libMagickCore-7.Q16HDRI.so.5.0.0 /usr/local/lib/libMagickCore-7.Q16HDRI.so.5.0.0
libtool: install: (cd /usr/local/lib & & { ln -s -f libMagickCore-7.Q16HDRI.so.5.0.0 libMagickCore-7.Q16HDRI.so.5 || { rm -f libMagickCore-7.Q16HDRI.so.5 & & ln -s libMagickCore-7.Q16HDRI.so.5.0.0 libMagickCore-7.Q16HDRI.so.5 } })
libtool: install: (cd /usr/local/lib & & { ln -s -f libMagickCore-7.Q16HDRI.so.5.0.0 libMagickCore-7.Q16HDRI.so || { rm -f libMagickCore-7.Q16HDRI.so & & ln -s libMagickCore-7.Q16HDRI.so.5.0.0 libMagickCore-7.Q16HDRI.so } })
libtool: install: /usr/bin/install -c MagickCore/.libs/libMagickCore-7.Q16HDRI.lai /usr/local/lib/libMagickCore-7.Q16HDRI.la
libtool: warning: relinking ' MagickWand/libMagickWand-7.Q16HDRI.la'
libtool: install: (cd /root/ImageMagick-7.0.7-27 /bin/sh " /root/ImageMagick-7.0.7-27/libtool" --silent --tag CC --mode=relink gcc -std=gnu99 -std=gnu99 -fopenmp -g -O2 -Wall -mtune=core-avx-i -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -no-undefined -Wl,--version-script=./MagickWand/libMagickWand.map -version-info 5:0:0 -o MagickWand/libMagickWand-7.Q16HDRI.la -rpath /usr/local/lib MagickWand/MagickWand_libMagickWand_7_Q16HDRI_la-animate.lo MagickWand/MagickWand_libMagickWand_7_Q16HDRI_la-compare.lo MagickWand/MagickWand_libMagickWand_7_Q16HDRI_la-composite.lo MagickWand/MagickWand_libMagickWand_7_Q16HDRI_la-conjure.lo MagickWand/MagickWand_libMagickWand_7_Q16HDRI_la-convert.lo MagickWand/MagickWand_libMagickWand_7_Q16HDRI_la-deprecate.
.
..
.
.
/usr/bin/install -c -m 644 MagickCore/ImageMagick.pc MagickCore/MagickCore.pc MagickCore/ImageMagick-7.Q16HDRI.pc MagickCore/MagickCore-7.Q16HDRI.pc MagickWand/MagickWand.pc MagickWand/MagickWand-7.Q16HDRI.pc Magick++/lib/Magick++.pc Magick++/lib/Magick++-7.Q16HDRI.pc ' /usr/local/lib/pkgconfig'
make[2]: Leaving directory `/root/ImageMagick-7.0.7-27'
make[1]: Leaving directory `/root/ImageMagick-7.0.7-27'
configure the dynamic linker for run-time bindings
[root@linuxhelp11 ImageMagick-7.0.7-27]# ldconfig /usr/local/lib
Installation is complete, to check , check for version using following command
[root@linuxhelp11 ~]# convert -version
Version: ImageMagick 7.0.7-27 Q16 x86_64 2018-03-23 http://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in):
With this, the tutorial on installing ImageMagick from source on CentOS 7 comes to an end.