首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rmagick安装失败

Rmagick安装失败
EN

Stack Overflow用户
提问于 2016-04-17 08:30:20
回答 1查看 947关注 0票数 2

在我的Mac上安装rmagick gem时出现问题。我所有的软件都是最新的。这是我的错误消息。我试过重新安装ImageMagick,但似乎什么都不起作用。我用的是自制软件--因为这个问题不能这么做,对吧?

我是一个命令行新手,所以这可能是一个简单的修复方法,但是我不理解这个错误消息。

代码语言:javascript
复制
Devens-MacBook-Air:~ Deven$ gem install rmagick  
Building native extensions.  This could take a while...  
ERROR:  Error installing rmagick:  
    ERROR: Failed to build gem native extension.

current directory: /usr/local/lib/ruby/gems/2.3.0/gems/rmagick-      2.15.4/ext/RMagick
/usr/local/opt/ruby/bin/ruby -r ./siteconf20160416-51851-5yrwrn.rb               extconf.rb  
checking for clang... yes  
checking for Magick-config... yes  
checking for outdated ImageMagick version (<= 6.4.9)... no  
/usr/local/bin/Magick-config: line 41: pkg-config: command not found  
/usr/local/bin/Magick-config: line 47: pkg-config: command not found  
/usr/local/bin/Magick-config: line 50: pkg-config: command not found  
/usr/local/bin/Magick-config: line 53: pkg-config: command not found  
checking for Ruby version >= 1.8.5... yes  
/usr/local/bin/Magick-config: line 53: pkg-config: command not found  
Can't install RMagick 2.15.4. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.  

*** 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  
-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=/usr/local/Cellar/ruby/2.3.0/bin/$(RUBY_BASE_NAME)

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /usr/local/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0/rmagick-2.15.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/local/lib/ruby/gems/2.3.0/gems/rmagick-2.15.4 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0/rmagick-2.15.4/gem_make.out
EN

回答 1

Stack Overflow用户

发布于 2017-12-17 18:17:43

下面的所有命令行都会解决这个问题。

代码语言:javascript
复制
brew install imagemagick
cd /usr/local/Cellar/imagemagick/6.8.0-10/lib
ln -s libMagick++-Q16.7.dylib   libMagick++.dylib
ln -s libMagickCore-Q16.7.dylib libMagickCore.dylib
ln -s libMagickWand-Q16.7.dylib libMagickWand.dylib
gem install rmagick

6.8.0是这里的imagemagick版本。希望这能行得通。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36671374

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档