How to compile and install GraphicsMagick (GM) in Linux
Today, I installed GM in my Mint machine. Here is the steps I used to compile and install GM in my Mint machine.
Prerequired libraries:
sudo apt-get install -y libpng-dev libjpeg-dev
sudo apt-get install -y libjasper-dev
sudo apt-get install -y install libtiff5-dev libfreetype6-dev
Download GM source:
http://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/1.3.21/GraphicsMagick-1.3.21.tar.gz/download
Extract the archive file:
tar -xf GraphicsMagick-1.3.21.tar.gz
Configure, complie and install:
./configure --prefix=[path to install GM] --enable-shared --enable-symbol-prefix --with-frozenpaths --with-ttf --with-jbig --with-jpeg --with-jp2 --with-png --with-tiff --with-webp --with-wmf
sudo make install (su/sudo is necessary if you want to install other than home directory, i.e: /opt/)
Create GM_HOME sh in the profile directory:
(In Mint Linux gm_home.sh file should be in /etc/profile.d/gm_home.sh)
Create gm_home.sh file by your favourite editor and add the following lines:
export GM_HOME=[Path to installed GM directory]
export PATH=$PATH:$GM_HOME/bin
Save the file and logout/restart machine. After login, check whether GM installed correctly or not by executing the following command:
Verify
gm version
gm convert -list formats
gm convert -list delegates
You will learn more about GM installation, options, features from the following sites:
- http://www.graphicsmagick.org/INSTALL-unix.html
- ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/delegates/
Prerequired libraries:
sudo apt-get install -y libpng-dev libjpeg-dev
sudo apt-get install -y libjasper-dev
sudo apt-get install -y install libtiff5-dev libfreetype6-dev
Download GM source:
http://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/1.3.21/GraphicsMagick-1.3.21.tar.gz/download
Extract the archive file:
tar -xf GraphicsMagick-1.3.21.tar.gz
Configure, complie and install:
./configure --prefix=[path to install GM] --enable-shared --enable-symbol-prefix --with-frozenpaths --with-ttf --with-jbig --with-jpeg --with-jp2 --with-png --with-tiff --with-webp --with-wmf
sudo make install (su/sudo is necessary if you want to install other than home directory, i.e: /opt/)
Create GM_HOME sh in the profile directory:
(In Mint Linux gm_home.sh file should be in /etc/profile.d/gm_home.sh)
Create gm_home.sh file by your favourite editor and add the following lines:
export GM_HOME=[Path to installed GM directory]
export PATH=$PATH:$GM_HOME/bin
Verify
gm version
gm convert -list formats
gm convert -list delegates
You will learn more about GM installation, options, features from the following sites:
- http://www.graphicsmagick.org/INSTALL-unix.html
- ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/delegates/
Comments
Post a Comment