3

当我运行时run rake db:create,我得到这个错误语句:

rake aborted!
dlopen(/Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/lib/RMagick2.bundle, 9): Library not loaded: /usr/local/lib/libjpeg.8.dylib
  Referenced from: /usr/local/opt/imagemagick/lib/libMagickCore.5.dylib
  Reason: Incompatible library version: libMagickCore.5.dylib requires version 13.0.0 or later, but libjpeg.8.dylib provides version 12.0.0 - /Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/lib/RMagick2.bundle
/Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/lib/rmagick.rb:11:in `require'
/Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/lib/rmagick.rb:11:in `<top (required)>'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `require'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `each'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `block in require'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `each'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `require'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler.rb:128:in `require'
/Users/adam/rubydev/app-staging/config/application.rb:13:in `<top (required)>'
/Users/adam/rubydev/app-staging/Rakefile:5:in `require'
/Users/adam/rubydev/app-staging/Rakefile:5:in `<top (required)>'
/Users/adam/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `eval'
/Users/adam/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)

我整个下午都在寻找问题以及如何解决它,但没有成功。

有问题的部分在这里:

  Referenced from: /usr/local/opt/imagemagick/lib/libMagickCore.5.dylib
  Reason: Incompatible library version: libMagickCore.5.dylib requires version 13.0.0 or later, but libjpeg.8.dylib provides version 12.0.0 - /Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/lib/RMagick2.bundle

如何libMagickCore.5.dylib在 OS X Lion 上升级?

先感谢您

编辑:重新安装后,imagemagick我跑了rake db:create,得到:

rake db:createrake aborted!
dlopen(/Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/lib/RMagick2.bundle, 9): Library not loaded: /usr/local/opt/imagemagick/lib/libMagickCore.5.dylib
  Referenced from: /Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/lib/RMagick2.bundle
  Reason: image not found - /Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/lib/RMagick2.bundle
/Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/lib/rmagick.rb:11:in `require'
/Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/lib/rmagick.rb:11:in `<top (required)>'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `require'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `each'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `block in require'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `each'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `require'
/Users/adam/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler.rb:128:in `require'
/Users/adam/rubydev/app-staging/config/application.rb:13:in `<top (required)>'
/Users/adam/rubydev/app-staging/Rakefile:5:in `require'
/Users/adam/rubydev/app-staging/Rakefile:5:in `<top (required)>'
/Users/adam/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `eval'
/Users/adam/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)
4

2 回答 2

8

gem pristine rmagick从命令行尝试。

参考:https ://github.com/mroth/lolcommits/issues/65

于 2013-07-17T13:13:26.163 回答
5

我过去遇到过类似的问题,只是在操作系统和开发人员工具上运行了软件更新。

如果这不能解决问题,您还可以尝试使用 homebrew 删除并重新安装 imagemagic,方法是运行:

brew update
brew remove imagemagick
brew install imagemagick
于 2012-12-19T19:49:52.890 回答