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

在MacOS Sierra上安装Rmagick和Imagemagick时出错

  •  0
  • Neves  · 技术社区  · 8 年前

    这是我每次都能得到的。

    Building native extensions with: '--with-opt-lib /usr/local/opt/imagemagick@6/lib --with-opt-include /usr/local/opt/imagemagick@6/include'
        This could take a while...
        ERROR:  Error installing rmagick:
            ERROR: Failed to build gem native extension.
    
            /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb --with-opt-lib /usr/local/opt/imagemagick@6/lib --with-opt-include /usr/local/opt/imagemagick@6/include
        /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1674:in `dir_config': undefined method `split' for true:TrueClass (NoMethodError)
            from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:2378:in `init_mkmf'
            from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:2415:in `<module:MakeMakefile>'
            from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:47:in `<top (required)>'
            from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
            from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
            from extconf.rb:4:in `<main>'
    
    
        Gem files will remain installed in /Users/neves/.rvm/gems/ruby-2.3.1@aut-rails4/gems/rmagick-2.16.0 for inspection.
        Results logged to /Users/neves/.rvm/gems/ruby-2.3.1@authorea-rails4/gems/rmagick-2.16.0/ext/RMagick/gem_make.out
    
    1 回复  |  直到 7 年前
        1
  •  3
  •   HM Tanbir    8 年前

    brew update

    brew install imagemagick@6 然后配置路径并安装rmagic gem

    PKG_CONFIG_PATH=/usr/local/opt/imagemagick@6/lib/pkgconfig gem install rmagick