本来の目的
rmagickの導入
$ gem install rmagick
エラーになる
Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. current directory: /Users/名前/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rmagick-2.16.0/ext/RMagick /Users/名前/.rbenv/versions/2.5.1/bin/ruby -r ./siteconf20181219-13129-kplq5y.rb extconf.rb checking for clang... 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 --without-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/名前/.rbenv/versions/2.5.1/bin/$(RUBY_BASE_NAME) To see why this extension failed to compile, please check the mkmf.log which can be found here: /Users/名前/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/rmagick-2.16.0/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Users/名前/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rmagick-2.16.0 for inspection. Results logged to /Users/名前/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/rmagick-2.16.0/gem_make.out
リンク内容
上記の記事を参考。
ImageMagick 7 をアンインストールしたい
ターミナル
mba:アプリケーション名 名前$ brew uninstall imagemagick
エラー
Error: No such keg: /usr/local/Cellar/imagemagick
自分でやっちまったと思ったこと(直接的な原因じゃないかもしれませんが、一応書いておきます)
RMagick をインストールできたと思って
Gemfile
gem 'rmagick'
ターミナル
$ bundle install
をやってしまいました。
お手数ですがよろしくお願いします。
「gem install rmagickを実行すること」と、「Gemfileに"gem 'rmagick' "を記載してbundle installを実行すること」は、同じ行為です。
また、「brew uninstall imagemagick」時のエラーの内容はimagemagickのインストール先に実体が無い、と言っています。手動で/usr/local/Cellar/imagemagickを削除などしましたでしょうか。
さて、ご質問者様の最終的な目的は、「rmagickを使えるようになること」でよろしいでしょうか。
コメントありがとうございます。
そうなんですね。次からの質問に反映されます。
削除はしていないと思います。(ターミナルはブログなどに書かれていたコードをコピペしましたが、当初出ていたエラーコードと同じですので大丈夫だと思います)
そうです!使いたいです!
ちなみに全然意味のないことかもしれないんですが
$ convert -versionをしたら
Version: ImageMagick 6.9.10-14 Q16 x86_64 2018-10-25と出ました。
回答1件
あなたの回答
tips
プレビュー