簡體   English   中英

在MacOS Sierra上安裝Rmagick和Imagemagick時出錯

[英]Error installing Rmagick and Imagemagick on MacOS Sierra

在Mac上安裝Imagemagick @ 6時出現此錯誤。 這使我無法在本地計算機上運行Rails應用程序。 我嘗試了許多選項,例如更改bash配置文件,向config添加內容等。我嘗試刪除了gem和rmv文件,然后重新安裝。

這是我每次都能得到的。

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

在第一次brew update更新沖泡

然后安裝imagemagic brew install imagemagick@6然后配置路徑並安裝rmagic gem

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM