dergachev/screengif

Library not loaded: /usr/local/lib/libMagickCore-6.Q16.1.dylib (LoadError)

gnestor opened this issue · 10 comments

After following the OS X install instructions, I was getting the following error:

grant:Magic Console grant$ screengif --input live\ edit.mov --output live\ edit.gif
/Users/grant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Users/grant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/rmagick-2.15.4/RMagick2.bundle, 9): Library not loaded: /usr/local/lib/libMagickCore-6.Q16.1.dylib (LoadError)
  Referenced from: /Users/grant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/rmagick-2.15.4/RMagick2.bundle
  Reason: image not found - /Users/grant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/rmagick-2.15.4/RMagick2.bundle
    from /Users/grant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/grant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rmagick-2.15.4/lib/rmagick_internal.rb:12:in `<top (required)>'
    from /Users/grant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/grant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/grant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rmagick-2.15.4/lib/RMagick.rb:1:in `<top (required)>'
    from /Users/grant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/grant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/grant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/screengif-0.0.3/lib/screengif.rb:3:in `<top (required)>'
    from /Users/grant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/grant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/grant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/screengif-0.0.3/bin/screengif:8:in `<top (required)>'
    from /Users/grant/.rbenv/versions/2.2.2/bin/screengif:23:in `load'
    from /Users/grant/.rbenv/versions/2.2.2/bin/screengif:23:in `<main>'

I had previous versions of imagemagick and ffmpeg installed (and possibly rmagick). I found this solution on Stack Overflow that fixed the problem:

http://stackoverflow.com/a/19040933/2217533

Thanks for sharing this here, I'll link to this issue from the README. :)

I ran into the same issue, but it was complaining about the /usr/local/lib/libmp3lame.0.dylib library instead.

screengif --input asdf.mov --output file.gif
dyld: Library not loaded: /usr/local/lib/libmp3lame.0.dylib
  Referenced from: /usr/local/bin/ffmpeg
  Reason: image not found
/Users/ethanmuller/.rvm/gems/ruby-2.0.0-p576/gems/rmagick-2.15.4/lib/rmagick_internal.rb:1605:in `from_blob': zero-length blob not permitted `' @ error/blob.c/BlobToImage/337 (Magick::ImageMagickError)
    from /Users/ethanmuller/.rvm/gems/ruby-2.0.0-p576/gems/rmagick-2.15.4/lib/rmagick_internal.rb:1605:in `block in from_blob'
    from /Users/ethanmuller/.rvm/gems/ruby-2.0.0-p576/gems/rmagick-2.15.4/lib/rmagick_internal.rb:1604:in `each'
    from /Users/ethanmuller/.rvm/gems/ruby-2.0.0-p576/gems/rmagick-2.15.4/lib/rmagick_internal.rb:1604:in `from_blob'
    from /Users/ethanmuller/.rvm/gems/ruby-2.0.0-p576/gems/screengif-0.0.3/lib/screengif.rb:74:in `start'
    from /Users/ethanmuller/.rvm/gems/ruby-2.0.0-p576/gems/screengif-0.0.3/bin/screengif:10:in `<top (required)>'
    from /Users/ethanmuller/.rvm/gems/ruby-2.0.0-p576/bin/screengif:23:in `load'
    from /Users/ethanmuller/.rvm/gems/ruby-2.0.0-p576/bin/screengif:23:in `<main>'
    from /Users/ethanmuller/.rvm/gems/ruby-2.0.0-p576/bin/ruby_executable_hooks:15:in `eval'
    from /Users/ethanmuller/.rvm/gems/ruby-2.0.0-p576/bin/ruby_executable_hooks:15:in `<main>'

The stackoverflow solution above worked for me as well. 😄

gem pristine rmagick helped me. thanks to lolcommits/lolcommits#9 (comment)

It works. Thanks.

Thanks. you save my time

Thanks a lot. It worked for me.

It works!

Worked!

It didn't help me

gem pristine rmagick helped me. thanks to lolcommits/lolcommits#9 (comment)

Worked so well!