Skip to content

Instantly share code, notes, and snippets.

@thenadz
Forked from whyvez/install-gm-w-librvg.sh
Last active March 2, 2017 10:05
Show Gist options
  • Save thenadz/f0695b87be16f38bec5d to your computer and use it in GitHub Desktop.
Save thenadz/f0695b87be16f38bec5d to your computer and use it in GitHub Desktop.
Installs ImageMagick --with-librsvg on Amazon Linux
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig
export PATH=/usr/bin:$PATH
export LDFLAGS=-L/usr/lib64:/usr/lib
export LD_LIBRARY_PATH=/usr/lib64:/usr/lib
export CPPFLAGS=-I/usr/include
PREFIX=/usr
sudo yum-config-manager --enable epel
sudo yum -y update && sudo yum -y upgrade
sudo yum install -y gcc gcc-c++ libxml2-devel libpng-devel libjpeg-turbo-devel fontconfig-devel \
gobject-introspection-devel pixman-devel harfbuzz-devel freetype-devel
curl -L http://ftp.gnome.org/pub/gnome/sources/libcroco/0.6/libcroco-0.6.11.tar.xz | tar xvJ
cd libcroco-*
./configure --prefix=$PREFIX --disable-static
make
sudo make install
cd ..
curl -L http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.31/gdk-pixbuf-2.31.7.tar.xz | tar xvJ
cd gdk-pixbuf-*
./configure --prefix=$PREFIX --disable-static
make
sudo make install
cd ..
curl -L http://cairographics.org/releases/cairo-1.14.6.tar.xz | tar xvJ
cd cairo-*
./configure --prefix=$PREFIX --disable-static
make
sudo make install
cd ..
curl -L http://ftp.gnome.org/pub/gnome/sources/pango/1.38/pango-1.38.1.tar.xz | tar xvJ
cd pango-*
./configure --prefix=$PREFIX --disable-static
make
sudo make install
cd ..
curl -L http://ftp.gnome.org/pub/gnome/sources/librsvg/2.40/librsvg-2.40.13.tar.xz | tar xvJ
cd librsvg-*
./configure --prefix=$PREFIX --disable-static
make
sudo make install
cd ..
curl -L ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz | tar -xz
cd ImageMagick-*
./configure --prefix=$PREFIX --with-gslib --with-rsvg --with-wmf --with-gvc \
--without-magick-plus-plus --disable-static --with-frozenpaths --disable-docs
make
sudo make install
cd ..
sudo ldconfig /usr/lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment