Skip to content

Instantly share code, notes, and snippets.

@hexfusion
Created February 21, 2014 19:43
Show Gist options
  • Save hexfusion/9141943 to your computer and use it in GitHub Desktop.
Save hexfusion/9141943 to your computer and use it in GitHub Desktop.
install (Image::Magick) on a custom Perl installed via plenv
# thanks to
# http://darkpan.com/files/plenv-imagemagick.txt
# for original info.
Installing ImageMagick (Image::Magick) on a custom Perl installed via plenv
- plenv
git clone git://github.com/tokuhirom/plenv.git ~/.plenv
echo 'export PATH="$HOME/.plenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(plenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
- perl-build
git clone git://github.com/tokuhirom/Perl-Build.git ~/.plenv/plugins/perl-build/
- relog in the shell
logout
login
- install new perl and switch to it
plenv install 5.18.1 -Duseshrplib
plenv rehash
plenv global 5.18.1
- verify
perl -V:version
should give 5.18.1
perl -lE'use Config;say((split(",",$Config{ccdlflags}))[-1])'
should give you ~/.plenv/ .... /CORE
- ImageMagick download and install
curl -LO http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xf ImageMagick.tar.gz
cd ImageMagick-*
LDFLAGS=-L$( perl -lE'use Config;say((split(",",$Config{ccdlflags}))[-1])' ) ./configure --prefix=${HOME}/local --with-perl=${HOME}/.plenv/shims/perl --enable-shared --disable-openmp --disable-opencl --without-x
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment