-
-
Save debborafernandess/8c116f2bdfb179a29737b434d38075a0 to your computer and use it in GitHub Desktop.
Installs ImageMagick --with-librsvg on Amazon Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# With this I was able to successfuly install everything | |
# on a x86 (32-bit) instance of Amazon Linux. | |
# | |
# You should probably not run this script | |
# It is a much better idea to use this as an Install guide | |
# Just follow it down, use your tab and be happy | |
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 | |
sudo yum-config-manager --enable epel | |
#sudo yum update -y | |
sudo yum install -y gcc gcc-c++ glib2-devel libxml2-devel libpng-devel \ | |
libjpeg-turbo-devel gobject-introspection gobject-introspection-devel | |
wget http://ftp.gnome.org/pub/GNOME/sources/libcroco/0.6/libcroco-0.6.8.tar.xz | |
tar xvfJ libcroco-0.6.8.tar.xz | |
cd libcroco-0.6.8 | |
./configure --prefix=/usr | |
make | |
sudo make install | |
cd .. | |
wget http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.28/gdk-pixbuf-2.28.2.tar.xz | |
tar xvfJ gdk-pixbuf-2.28.2.tar.xz | |
cd gdk-pixbuf-2.28.2 | |
./configure --prefix=/usr --without-libtiff | |
make | |
sudo make install | |
cd .. | |
sudo yum install -y pixman-devel harfbuzz-devel freetype-devel | |
# I had a problem with fontconfig not finding the default fonts folder | |
# on a C parser that uses Cairo and rsvg to draw forms and reports | |
# So I recompiled and reinstalled everything from here to ImageMagick again. | |
# You can also just add export FONTCONFIG_PATH=/etc/fonts at /etc/bashrc | |
# or whatever you want. | |
# added --enable-static --sysconfdir=/etc --localstatedir=/var | |
wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.10.91.tar.gz | |
tar xvf fontconfig-2.10.91.tar.gz | |
cd fontconfig-2.10.91 | |
./configure --prefix=/usr --enable-libxml2 --enable-static --sysconfdir=/etc --localstatedir=/var | |
make | |
sudo make install | |
cd .. | |
wget http://cairographics.org/releases/cairo-1.12.14.tar.xz | |
tar xvfJ cairo-1.12.14.tar.xz | |
cd cairo-1.12.14 | |
./configure --prefix=/usr | |
make | |
sudo make install | |
cd .. | |
wget http://ftp.gnome.org/pub/GNOME/sources/pango/1.34/pango-1.34.1.tar.xz | |
tar xvfJ pango-1.34.1.tar.xz | |
cd pango-1.34.1 | |
./configure --prefix=/usr | |
make | |
sudo make install | |
cd .. | |
wget http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.40/librsvg-2.40.6.tar.xz | |
tar xvfJ librsvg-2.40.6.tar.xz | |
cd librsvg-2.40.6 | |
./configure --prefix=/usr | |
make | |
sudo make install | |
cd .. | |
wget http://www.imagemagick.org/download/ImageMagick.tar.gz | |
tar xvf ImageMagick.tar.gz | |
cd ImageMagick-6.9.2-10 | |
./configure --prefix=/usr --with-rsvg | |
make | |
sudo make install | |
cd .. | |
# THIS IS VERY IMPORTANT | |
sudo ldconfig /usr/lib |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment