简体   繁体   中英

Rmagick Broken: Library not loaded: /usr/local/lib/libMagickCore-6.Q16.1.dylib

Rmagick complains that its broken when trying to run any migrations. On OSX Sierra.

/Users/xyz/.rvm/gems/ruby-2.4.0@nucloud/gems/rmagick-2.16.0/lib/rmagick_internal.rb:12:in `require': dlopen(/Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/rmagick-2.16.0/lib/RMagick2.bundle, 9): Library not loaded: /usr/local/lib/libMagickCore-6.Q16.2.dylib
  Referenced from: /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/rmagick-2.16.0/lib/RMagick2.bundle
  Reason: image not found - /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/rmagick-2.16.0/lib/RMagick2.bundle (LoadError)
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/rmagick-2.16.0/lib/rmagick_internal.rb:12:in `<top (required)>'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/rmagick-2.16.0/lib/rmagick.rb:1:in `require'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/rmagick-2.16.0/lib/rmagick.rb:1:in `<top (required)>'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `require'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `each'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `block in require'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `each'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `require'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/bundler-1.15.1/lib/bundler.rb:108:in `require'
    from /Users/xyz/code/nc_rails5/config/application.rb:7:in `<top (required)>'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/spring-1.7.2/lib/spring/application.rb:82:in `require'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/spring-1.7.2/lib/spring/application.rb:82:in `preload'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/spring-1.7.2/lib/spring/application.rb:143:in `serve'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/spring-1.7.2/lib/spring/application.rb:131:in `block in run'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/spring-1.7.2/lib/spring/application.rb:125:in `loop'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/spring-1.7.2/lib/spring/application.rb:125:in `run'
    from /Users/xyz/.rvm/gems/ruby-2.4.0@nc/gems/spring-1.7.2/lib/spring/application/boot.rb:19:in `<top (required)>'
    from /Users/xyz/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/xyz/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from -e:1:in `<main>'

gem pristine rmagick

fixed it. Apparently the library needed rebuilding after updates to OSX/homebrew

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM