LoginSignup
1
2

More than 5 years have passed since last update.

Solutions of install RMagick on Mac OSX

Posted at

Problem

  • System: Mac OSX

Installing RMagick gems for ruby, get error:

yukis$ gem install rmagick
/Users/yukis/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

        /Users/yukis/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb
checking for /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2... yes
checking for Magick-config... no
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
checking for outdated ImageMagick version (<= 6.4.9)... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/yukis/.rvm/rubies/ruby-1.9.3-p362/bin/ruby


Gem files will remain installed in /Users/yukis/.rvm/gems/ruby-1.9.3-p362/gems/rmagick-2.15.4 for inspection.
Results logged to /Users/yukis/.rvm/gems/ruby-1.9.3-p362/gems/rmagick-2.15.4/ext/RMagick/gem_make.out

Solution

  1. check pkg-config (or reinstalling it)
  2. run
C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.9.2-6/include/ImageMagick-6 PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.9.2-6/lib/pkgconfig gem install rmagick

Reference

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2