Skip to content

Instantly share code, notes, and snippets.

@Mossuru777
Last active January 18, 2016 16:18
Show Gist options
  • Save Mossuru777/3f77a70371eaff021927 to your computer and use it in GitHub Desktop.
Save Mossuru777/3f77a70371eaff021927 to your computer and use it in GitHub Desktop.
plenv環境でのImage::Magickインストール

Installing ImageMagick (Image::Magick) on a custom Perl installed via plenv
https://darkpan.com/files/plenv-imagemagick.txtより転載

  • 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
  • Profit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment