Skip to content

Instantly share code, notes, and snippets.

@rzamana
Forked from identityclash/debian-graphicsmagick.sh
Created February 13, 2017 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rzamana/a759eb600b9f37a88e732b7532ba5aff to your computer and use it in GitHub Desktop.
Save rzamana/a759eb600b9f37a88e732b7532ba5aff to your computer and use it in GitHub Desktop.
install graphicsmagick on debian with png, jpeg, tiff, and webp support
apt-get install make git g++ gcc zlib1g zlib1g-dev libxml2 libxml2-dev -y
# https://developers.google.com/speed/webp/docs/compiling#building
cd /usr/local/src
wget http://downloads.webmproject.org/releases/webp/libwebp-0.4.3.tar.gz
tar -xvzf libwebp-0.4.3.tar.gz
cd libwebp-0.4.3
./configure
make && make install
# http://www.ijg.org/
cd /usr/local/src
curl --remote-name http://www.ijg.org/files/jpegsrc.v9a.tar.gz
tar -xzvf jpegsrc.v9a.tar.gz
cd jpeg-9a
./configure --prefix=/usr/local/libjpeg-9a
make && make install
ln -s libjpeg-9a /usr/local/libjpeg
# http://www.libpng.org/pub/png/libpng.html
cd /usr/local/src
curl --remote-name --location http://download.sourceforge.net/libpng/libpng-1.6.18.tar.gz
tar -xzvf libpng-1.6.18.tar.gz
cd libpng-1.6.18
apt-get install zlib1g zlib1g-dev -y
./configure --prefix=/usr/local/libpng-1.6.18
make && make install
ln -s libpng-1.6.18 /usr/local/libpng
# http://www.remotesensing.org/libtiff/
cd /usr/local/src
curl --remote-name http://download.osgeo.org/libtiff/tiff-4.0.4.tar.gz
tar -xzvf tiff-4.0.4.tar.gz
cd tiff-4.0.4
./configure --prefix=/usr/local/libtiff-4.0.4
make && make install
ln -s libtiff-4.0.4 /usr/local/libtiff
# taken from http://mac-dev-env.patrickbougie.com/graphicsmagick/
cd /usr/local/src
curl --remote-name --location http://download.sourceforge.net/graphicsmagick/GraphicsMagick-1.3.22.tar.gz
tar -xzvf GraphicsMagick-1.3.22.tar.gz
cd GraphicsMagick-1.3.22
./configure \
LDFLAGS="-L/usr/local/libjpeg/lib -L/usr/local/libpng/lib -L/usr/local/libtiff/lib" \
CPPFLAGS="-I/usr/local/libjpeg/include -I/usr/local/libpng/include -I/usr/local/libtiff/include"
make && make install && make check
ln -s graphicsmagick-1.3.22 /usr/local/graphicsmagick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment