LoginSignup
0
1

More than 5 years have passed since last update.

Sierraでrmagickがインストールできない問題

Posted at

rmagickをインストールしたら躓いたのでメモ

参考
ImageMagick 7 with RMagick 2.16 on MacOS Sierra Can't find MagickWand.h

躓いたところ

$ bundle
bundle
The git source `git://github.com/JangoSteve/remotipart.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
The git source `git://github.com/brainspec/enumerize.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.....
# 略

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

# エラーは略
An error occurred while installing rmagick (X.X.X), and Bundler cannot continue.
Make sure that `gem install rmagick -v 'X.X.X'` succeeds before bundling.

rmagickのインストールでつまづく。

言われたとおりに rmagick を入れてみる。

$ gem install rmagick
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

#errorが起きてインストールできない。

解決策

今回予定していた動作をさせる環境では imagemagick6 が必要だったらしく、まずはimagemagick6をbrewで入れる。

$ brew install imagemagick@6

imagemagick@6brew link させる。

$ brew unlink imagemagick
$ brew link --force imagemagick@6

これで正常に rmagickgem でいれることができ、その正常に bundle が通りました。

0
1
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
0
1