本文介绍了RMagick抱怨在OSX中找不到libMagickCore.5.dylib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
运行 brew upgrade imagemagick
后,当我运行 rails s
我会得到
after running brew upgrade imagemagick
, when I run rails s
I'll get
/Users/tomi/.rvm/gems/ruby-2.0.0-p247@ezaaa/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require': dlopen(/Users/tomi/.rvm/gems/ruby-2.0.0-p247@ezaaa/gems/rmagick-2.13.2/lib/RMagick2.bundle, 9): Library not loaded: /usr/local/lib/libMagickCore.5.dylib (LoadError)
Referenced from: /Users/tomi/.rvm/gems/ruby-2.0.0-p247@ezaaa/gems/rmagick-2.13.2/lib/RMagick2.bundle
Reason: image not found - /Users/tomi/.rvm/gems/ruby-2.0.0-p247@ezaaa/gems/rmagick-2.13.2/lib/RMagick2.bundle
我正在使用Carrierwave gem和RMagick,OS是OSX Moutain Lion
I'm using Carrierwave gem with RMagick, OS is OSX Moutain Lion
推荐答案
找到无关的答案我设法解决这个问题:
thx to bit unrelated answer found here I manage to fix this by:
1 /在系统中搜索此lib
1/ search for this lib in the system
sudo find / -name "libMagickCore.5.dylib" -print
我发现我的 /usr/local/Cellar/imagemagick/6.7.7-6/lib /libMagickCore.5.dylib
2 /将此库链接到所需路径
2/ link this library to required path
ln /usr/local/Cellar/imagemagick/6.7.7-6/lib/libMagickCore.5.dylib /usr/local/lib/libMagickCore.5.dylib
这篇关于RMagick抱怨在OSX中找不到libMagickCore.5.dylib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!