Skip to content

Instantly share code, notes, and snippets.

@xxswingxx
Last active October 28, 2015 09:33
Show Gist options
  • Save xxswingxx/eb5a075ab3b7e2624a42 to your computer and use it in GitHub Desktop.
Save xxswingxx/eb5a075ab3b7e2624a42 to your computer and use it in GitHub Desktop.
Build and install ghostscript 9.14 from src

#Install ghostscript 9.14.md

Uninstall prior versions of ghostscript to avoid conflicts

sudo apt-get remove ghostscript

Install dependencies

 sudo apt-get install liblcms2-2 liblcms2-dev liblcms2-utils
 sudo apt-get install libx11-dev libxext-dev libxxf86vm-dev

Get the latest stable release (9.14) and uncompress it ([mirror] (https://dl.dropboxusercontent.com/u/3424209/ghostscript-9.14.tar.bz2)).

 wget http://downloads.ghostscript.com/public/ghostscript-9.14.tar.bz2
 tar -xvf ghostscript-9.14.tar.bz2
 cd ghostscript-9.14

Fix zlib bug, configure and install

 sed -i 's/ZLIBDIR=src/ZLIBDIR=$includedir/' configure.ac configure

 rm -rf zlib && ./configure --prefix=/usr --disable-compile-inits --enable-dynamic  && make
 
 make so

 sudo make soinstall
 sudo install -v -m644 base/*.h /usr/include/ghostscript
 sudo ln -v -s ghostscript /usr/include/ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment