Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to install GraphicsMagick on CentOS 6.4
#!/bin/bash
# Install build dependencies
yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel
# Get GraphicsMagick source
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.9.tar.gz
tar zxvf GraphicsMagick-1.3.9.tar.gz
# Configure and compile
cd GraphicsMagick-1.3.9
./configure --enable-shared
make
make install
# Ensure everything was installed correctly
gm version
# If you are going to use this with PHP you can also instal the pecl extension
pecl install gmagick-1.0.8b2
@guiomie

This comment has been minimized.

Show comment
Hide comment
@guiomie

guiomie Mar 7, 2015

I get "coders/png.c error: dereferencing pointer to incomplete type" everywhere in my console. The fix is to use version 1.3.21 of GraphicsMagick, otherwise libpng will break the whole thing.

guiomie commented Mar 7, 2015

I get "coders/png.c error: dereferencing pointer to incomplete type" everywhere in my console. The fix is to use version 1.3.21 of GraphicsMagick, otherwise libpng will break the whole thing.

@paul91

This comment has been minimized.

Show comment
Hide comment
@paul91

paul91 Mar 24, 2015

For reference, I was able to compile 1.3.9 without issue using the following version of libpng:

libpng.x86_64                   2:1.2.49-1.el6_2       @base                    
libpng-devel.x86_64             2:1.2.49-1.el6_2       @base 
Owner

paul91 commented Mar 24, 2015

For reference, I was able to compile 1.3.9 without issue using the following version of libpng:

libpng.x86_64                   2:1.2.49-1.el6_2       @base                    
libpng-devel.x86_64             2:1.2.49-1.el6_2       @base 
@venoodkhatuva12

This comment has been minimized.

Show comment
Hide comment
@venoodkhatuva12

venoodkhatuva12 May 30, 2016

gm version >> not found with root user
how to execute with root

gm version >> not found with root user
how to execute with root

@myqqai

This comment has been minimized.

Show comment
Hide comment
@myqqai

myqqai May 31, 2016

./configure: line 87: IFSer: command not found

echo $?
77

myqqai commented May 31, 2016

./configure: line 87: IFSer: command not found

echo $?
77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment