Introduction to Ghostscript

Ghostscript is a versatile processor for PostScript data with the ability to render PostScript to different targets. It used to be part of the cups printing stack, but is no longer used for that.

This package is known to build and work properly using an LFS-7.6 systemd platform.

Package Information

  • Download (HTTP):

  • Download MD5 sum: 75f2e8ab8891d052ade9b64eb4eb5294

  • Download size: 30 MB

  • Estimated disk space required: 212 MB (includes installing, add 5 MB if the fonts are installed)

  • Estimated build time: 2.3 SBU (includes building and installing

Additional Downloads

If you wish, you can download additional fonts.

Standard Fonts

Other Fonts

Ghostscript Dependencies



Cairo-1.12.16, Fontconfig-2.11.1 (required, if you are installing any suggested font), GTK+-2.24.24, Cups-1.7.5, Little CMS-1.19 (not used by default, nor if lcms2 is present or found), libidn-1.29, X Window System and libpaper

User Notes:

Installation of Ghostscript



The Ghostscript build system is not user-friendly. In order to use system copies of various graphics libraries, you must do it using unconventional methods.

GPL Ghostscript includes (old) copies of several libraries. Some of these seem to have been patched to fix known vulnerabilities, but others of these copies are less-well maintained. To ensure that any future fixes are applied throughout the whole system, it is recommended that you first install the released versions of these libraries and then configure GPL Ghostscript to link to them.

If you have installed these dependencies on your system, remove the copies of expat, freetype, lcms2, libjpeg, libpng and zlib:

sed -i 's/ZLIBDIR=src/ZLIBDIR=$includedir/' configure &&
rm -rf expat freetype lcms2 jpeg libpng zlib

Compile Ghostscript:

./configure --prefix=/usr           \
            --disable-compile-inits \
            --enable-dynamic        \
            --with-system-libtiff &&


The shared library depends on GTK+-2.24.24. It is only used in external programs like ImageMagick-6.8.9-7.

To compile the shared library, run the following additional command as an unprivileged user:

make so

This package does not come with a test suite. However, you may test the operation of the newly built gs program by issuing the following command (issue from an X Window System terminal):

bin/gs -Ilib -IResource/Init -dBATCH examples/tiger.eps

Now, as the root user:

make install

If you want the shared library too:

make soinstall

Now make the documentation accessible from the normal place:

ln -sfv ../ghostscript/9.14/doc /usr/share/doc/ghostscript-9.14

If you have downloaded any fonts, unpack them to /usr/share/ghostscript and ensure the ownerships of the files are root: root. Substitute <font-tarball> appropriately in the command below for the fonts you wish to install:

tar -xvf ../<font-tarball> -C /usr/share/ghostscript --no-same-owner &&
fc-cache -v /usr/share/ghostscript/fonts/

Command Explanations

sed -i 's/ZLIBDIR=src/ZLIBDIR=$includedir/' ... : Fixes building with system Zlib.

--disable-compile-inits: This option makes gs and slightly smaller.

--with-system-libtiff: Remove this option if you've not installed LibTIFF-4.0.3.

ln -sfv ../ghostscript-9.14/doc ... : This puts a symbolic link to the documentation where it is expected to be found.

--disable-cups: this option will save a tiny amount of space by not linking gs and to the Cups-1.7.5 libraries if you have installed those.


Installed Programs: dvipdf, eps2eps, font2c, gs, gsbj, gsc (from soinstall), gsdj, gsdj500, gslj, gslp, gsnd, gsx (from soinstall),, pdf2dsc, pdf2ps, pf2afm, pfbtopfa, pphs, printafm, ps2ascii, ps2epsi, ps2pdf, ps2pdf12, ps2pdf13, ps2pdf14, ps2pdfwr, ps2ps, ps2ps2,, and wftopfa
Installed Library: and /usr/lib/ghostscript/9.14/
Installed Directories: /usr/include/ghostscript, /usr/lib/ghostscript, /usr/share/ghostscript, and /usr/share/doc/ghostscript-9.14

Short Descriptions


is an interpreter for Adobe Systems' PostScript(tm) and Portable Document Format (PDF).

provides Ghostscript functionality to other programs, such as GSView, ImageMagick, and libspectre.

GPL Ghostscript provides many different scripts used to convert PostScript, PDF, and other formats. Please refer to the HTML documentation or the man pages for information about the capabilities provided.

Last updated on 2014-08-24 14:05:13 -0700