代码之家  ›  专栏  ›  技术社区  ›  Prakash

无法安装RMagick 2.15.4。找不到MagickWand.h

  •  3
  • Prakash  · 技术社区  · 7 年前

    当我试图安装rmagic时,它显示以下错误

    ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.
    
    /Users/***/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20170814-
    44982-1i5w4mc.rb extconf.rb
    checking for gcc... yes
    checking for Magick-config... no
    checking for pkg-config... yes
    checking for outdated ImageMagick version (<= 6.4.9)... no
    checking for Ruby version >= 1.8.5... yes
    checking for stdint.h... yes
    checking for sys/types.h... yes
    checking for wand/MagickWand.h... no
    
    Can't install RMagick 2.15.4. Can't find MagickWand.h.
    *** 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.
    

    2 回复  |  直到 7 年前
        1
  •  7
  •   hummmingbear    7 年前

    我不久前就有这个问题。您需要安装imagemagick。根据rmagic gem的github回购协议

    我相信你也可以用brew安装它

    $ brew install imagemagick@6
    $ brew link imagemagick@6 --force
    $ gem install rmagick
    
        2
  •  0
  •   davideghz    6 年前
    brew unlink pkgconfig
    bundle install
    brew link pkgconfig
    

    为我做了这件事