Skip to content

Instantly share code, notes, and snippets.

@leomelzer
Created October 24, 2012 22:29
Show Gist options
  • Star 30 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save leomelzer/3949356 to your computer and use it in GitHub Desktop.
Save leomelzer/3949356 to your computer and use it in GitHub Desktop.
Installing ImageMagick & Ghostscript on Ubuntu
  1. You have Ghostscript installed, right? Otherwise sudo apt-get install ghostscript
  2. This is important and installs the headers (iapi.h etc) which are required but don't come with the default Ghostscript package: sudo apt-get install libgs-dev
  3. I also needed sudo apt-get install gs-esp
  4. For me the pre compiled version of ImageMagick never accepted Ghostscript, so let's remove it: sudo apt-get --purge remove imagemagick
  5. Get the source of ImageMagick, untar it, cd ImageMagick-xx
  6. ./configure --with-gslib=yes [and what else you need]
  7. Confirm in the output near the bottom gslib yes yes and not gslib yes no
  8. make
  9. make install
  10. Run convert -list configure | grep DELEGATES => DELEGATES bzlib djvu freetype gs jpeg jng jp2 lcms png tiff x11 xml zlib
  11. See the gs in there? You got it!
@rbatta
Copy link

rbatta commented Mar 22, 2016

Thanks for this gist! It's a bit outdated, but here's what I got to work for me on Docker for a Rails app.

  • gs-esp no longer exists
  • If installing via a Dockerfile, the order matters (see below)
  • it plays nice with imagemagick so no longer need to run make or make install 😄
FROM ruby:2.3.0

RUN apt-get update -qq && apt-get install -y \
  ghostscript \
  libgs-dev \
  imagemagick

@DaveCollinsJr
Copy link

Thanks! Simply adding "ghostscript" to our Dockerfile apt-get lines solved an issue with Rmagick, ImageMagick, and "Font not found".

@ahmadhasankhan
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment