{"id":2526,"date":"2017-01-21T01:32:27","date_gmt":"2017-01-20T16:32:27","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/?p=2526"},"modified":"2017-01-21T01:32:27","modified_gmt":"2017-01-20T16:32:27","slug":"gem-install-rmagick-%e3%81%a7%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e5%a4%b1%e6%95%97","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=2526","title":{"rendered":"gem install rmagick \u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5931\u6557"},"content":{"rendered":"<p>\u7d50\u69cb\u30cf\u30de\u3063\u305f\u306e\u3067\u899a\u3048\u66f8\u304d\u3002<\/p>\n<p>\u6570\u3005\u306e\u89e3\u6c7a\u65b9\u6cd5\u304c\u3001Web\u306b\u306f\u8ee2\u304c\u3063\u3066\u3044\u305f\u306e\u3060\u304c\u3001\u4eca\u56de\u306e\u30b1\u30fc\u30b9\u306f\u3069\u308c\u306b\u3082\u5f53\u306f\u307e\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u72ec\u81ea\u306e\u89e3\u6c7a\u65b9\u6cd5\u3092\u8a18\u3059\u3002<\/p>\n<p>\u74b0\u5883<br \/>\nMac : 10.12.2<br \/>\nRuby: 2.2.2<br \/>\nImageMagick : 6.9.1<\/p>\n<p>\u6700\u521d\u3001brew \u306b\u3088\u3063\u3066\u3001ImageMagic \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001gem install rmagick \u3092\u5b9f\u884c\u3057\u3066\u3044\u305f\u304c\u3001\u4e0b\u8a18\u306e\u30a8\u30e9\u30fc\u304c\u983b\u767a\u3059\u308b\u3002<\/p>\n<p>[bash]<br \/>\n$ gem install rmagick -v &#8216;2.16.0&#8217;<br \/>\nBuilding native extensions.  This could take a while&#8230;<br \/>\nERROR:  Error installing rmagick:<br \/>\n        ERROR: Failed to build gem native extension.<\/p>\n<p>    \/Users\/xxxx\/.rbenv\/versions\/2.2.2\/bin\/ruby -r .\/siteconf20170121-33287-t9qj7o.rb extconf.rb<br \/>\nchecking for clang&#8230; yes<br \/>\nchecking for Magick-config&#8230; no<br \/>\nchecking for pkg-config&#8230; yes<br \/>\nchecking for outdated ImageMagick version (&lt;= 6.4.9)&#8230; no<br \/>\nchecking for presence of MagickWand API (ImageMagick version &gt;= 6.9.0)&#8230; no<br \/>\nchecking for Ruby version &gt;= 1.8.5&#8230; yes<br \/>\nchecking for stdint.h&#8230; yes<br \/>\nchecking for sys\/types.h&#8230; yes<br \/>\nchecking for wand\/MagickWand.h&#8230; no<\/p>\n<p>Can&#8217;t install RMagick 2.16.0. Can&#8217;t find MagickWand.h.<br \/>\n*** extconf.rb failed ***<br \/>\nCould not create Makefile due to some reason, probably lack of necessary<br \/>\nlibraries and\/or headers.  Check the mkmf.log file for more details.  You may<br \/>\nneed configuration options.<\/p>\n<p>Provided configuration options:<br \/>\n        &#8211;with-opt-dir<br \/>\n        &#8211;without-opt-dir<br \/>\n        &#8211;with-opt-include<br \/>\n        &#8211;without-opt-include=${opt-dir}\/include<br \/>\n        &#8211;with-opt-lib<br \/>\n        &#8211;without-opt-lib=${opt-dir}\/lib<br \/>\n        &#8211;with-make-prog<br \/>\n        &#8211;without-make-prog<br \/>\n        &#8211;srcdir=.<br \/>\n        &#8211;curdir<br \/>\n        &#8211;ruby=\/Users\/xxxx\/.rbenv\/versions\/2.2.2\/bin\/$(RUBY_BASE_NAME)<\/p>\n<p>extconf failed, exit code 1<br \/>\n[\/bash]<\/p>\n<p>\u305d\u3053\u3067\u3001<a href=\"http:\/\/cactuslab.com\/imagemagick\/\" target=\"_blank\">\u3053\u306e\u30b5\u30a4\u30c8\uff08http:\/\/cactuslab.com\/imagemagick\/\uff09<\/a>\u304b\u3089\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3002<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001\u4e0b\u8a18\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3002<br \/>\n[bash]<br \/>\n\/opt\/ImageMagick<br \/>\n[\/bash]<\/p>\n<p>\u53c2\u8003\u307e\u3067\u306b\u3001brew \u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5834\u5408\u306f\u3001\u4e0b\u8a18\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3002<br \/>\n[bash]<br \/>\n\/usr\/local\/Celler\/imagemagick<br \/>\n[\/bash]<\/p>\n<p>\u91cd\u8907\u3057\u306a\u3044\u70ba\u306b\u3001brew\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3082\u306e\u306f\u3001\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3002<br \/>\n[bash]<br \/>\n$ brew uninstall ImageMagick<br \/>\n[\/bash]<\/p>\n<p>\u5ff5\u306e\u70ba\u3001ImageMagick\u304c\u3001\u60f3\u5b9a\u901a\u308a\u306e\u3082\u306e\u304b\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u3001\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u306b\u3066\u78ba\u8a8d\u3002<\/p>\n<p>[bash]<br \/>\n$ convert &#8211;version<br \/>\nVersion: ImageMagick 6.9.1-0 Q16 x86_64 2015-03-22 http:\/\/www.imagemagick.org<br \/>\nCopyright: Copyright (C) 1999-2015 ImageMagick Studio LLC<br \/>\nLicense: http:\/\/www.imagemagick.org\/script\/license.php<br \/>\nFeatures: DPC OpenCL<br \/>\nDelegates (built-in): bzlib fftw jng jpeg lcms lzma png tiff webp xml zlib<\/p>\n<p>$ which convert<br \/>\n\/opt\/ImageMagick\/bin\/convert<br \/>\n[\/bash]<\/p>\n<p>\u25a0\u74b0\u5883\u5909\u6570\u306bpkgconfig\u3092\u8ffd\u8a18\u3059\u308b\u3002<br \/>\n[bash]<br \/>\n$ vi .bash_profile<\/p>\n<p># Setting PATH for ImageMagick<br \/>\nexport PKG_CONFIG_PATH=\/opt\/ImageMagick\/lib\/pkgconfig<\/p>\n<p>$ source .bash_profile<br \/>\n[\/bash]<\/p>\n<p>\u25a0 rmagick\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n[bash]<br \/>\n$ gem install rmagick<br \/>\nBuilding native extensions.  This could take a while&#8230;<br \/>\nSuccessfully installed rmagick-2.16.0<br \/>\nParsing documentation for rmagick-2.16.0<br \/>\nInstalling ri documentation for rmagick-2.16.0<br \/>\nDone installing documentation for rmagick after 10 seconds<br \/>\n1 gem installed<br \/>\n[\/bash]<\/p>\n<p>\u25a0\u307e\u3068\u3081<br \/>\n\u30dd\u30a4\u30f3\u30c8\u3068\u3057\u3066\u306f\u3001<br \/>\n\u30001. brew \u3067\u3001ImageMagic \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u3044\u3002<br \/>\n\u30002. PKG\u7248\u306eImageMagic\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001pkgconfig \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u74b0\u5883\u5909\u6570\u306b\u8ffd\u8a18\u3059\u308b\u3002<\/p>\n<p>\u306a\u304b\u306a\u304b\u3001\u3057\u3093\u3069\u304b\u3063\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7d50\u69cb\u30cf\u30de\u3063\u305f\u306e\u3067\u899a\u3048\u66f8\u304d\u3002 \u6570\u3005\u306e\u89e3\u6c7a\u65b9\u6cd5\u304c\u3001Web\u306b\u306f\u8ee2\u304c\u3063\u3066\u3044\u305f\u306e\u3060\u304c\u3001\u4eca\u56de\u306e\u30b1\u30fc\u30b9\u306f\u3069\u308c\u306b\u3082\u5f53\u306f\u307e\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u72ec\u81ea\u306e\u89e3\u6c7a\u65b9\u6cd5\u3092\u8a18\u3059\u3002 \u74b0\u5883 Mac : 10.12.2 Ruby: 2.2.2 ImageMagi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[17,25,14,4],"tags":[],"class_list":["post-2526","post","type-post","status-publish","format-standard","hentry","category-windowsmac","category-rails","category-ruby","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2526"}],"version-history":[{"count":1,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2526\/revisions"}],"predecessor-version":[{"id":2527,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2526\/revisions\/2527"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}