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

1

5

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>'
Huebner answered 15/1, 2018 at 15:59 Comment(0)
H
15

gem pristine rmagick

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

Huebner answered 15/1, 2018 at 16:0 Comment(2)
Had the same problem upgrading from Ubuntu 18.04 to 20.04, and this solved my problemAnxious
As of today, this still fixes the problem. Yay!Halftimbered

© 2022 - 2024 — McMap. All rights reserved.