Skip to content

Instantly share code, notes, and snippets.

@rxaviers
Last active November 8, 2017 13:45
Show Gist options
  • Select an option

  • Save rxaviers/4998952 to your computer and use it in GitHub Desktop.

Select an option

Save rxaviers/4998952 to your computer and use it in GitHub Desktop.
Compile and install ImageMagick from source

Commands:

$ wget http://www.imagemagick.org/download/legacy/ImageMagick-6.6.9-10.tar.gz
$ tar -xzf ImageMagick-6.6.9-10.tar.gz
$ cd ImageMagick-6.6.9-10
$ ./configure CFLAGS=-O5 CXXFLAGS=-O5 --prefix=/opt --enable-static --with-png --disable-shared

Make sure you have the below in the output

PNG               --with-png=yes		yes

Continuing

$ make -j5 && sudo make install
export MAGICK_HOME="/opt"
export PATH="$MAGICK_HOME/bin:$PATH"
export LD_LIBRARY_PATH="$MAGICK_HOME/lib/"
export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib/"

Make sure you get the right bin when running it

$ which convert
/opt/bin/convert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment