cannot open shared object file: No such file or directory

I’ve gotten this error after i’ve installed ImageMagick (from source) and RMagick (using gem) on my Debian system

libMagickCore.so.2: cannot open shared object file: No such file or directory – /usr/lib/ruby/gems/1.8/gems/rmagick-2.8.0/lib/RMagick2.so

To get rid of this error i executed

ldconfig /usr/local/lib
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Ma.gnolia
  • MisterWong
  • Reddit
  • SphereIt
  • StumbleUpon
  • Technorati
  • TwitThis
  • Yigg
  • LinkedIn
  • Print this article!
  • Tumblr
  • Pownce

13 Responses to “cannot open shared object file: No such file or directory”

  1. gdelfino Says:

    Thank you!

  2. IringB Says:

    Thanks for the tip!

  3. dira Says:

    Thanks, very useful tip!

  4. sv3nrg Says:

    Very, very useful!

  5. Lanza Says:

    You may want to add “–prefix=/usr” to “./configure” command, so that ImageMagick get installed in Debian default dirs.

  6. rc Says:

    You saved my life!!!!! Thank you!!!!

  7. ping Says:

    thanks, really useful!

  8. George Says:

    Thanks. This helped me as well.

  9. Travis Says:

    Awesome, thanks!

    But, in my case ldconfig wasn’t in my path, so I had to run:

    /sbin/ldconfig /usr/local/lib

  10. Ze Says:

    thank you so, so much!!!
    I was stuck in there.

  11. Nick Says:

    Oh thank god! This is not the first error I’ve encountered installing image magick, but it was the easiest to fix thanks to you!

  12. Eso Says:

    Thanks that helped a lot. Though I had to use:
    sudo /sbin/ldconfig /usr/local/imagemagick/lib

    because I set a custom prefix when installing imagemagick.

    When i tried without sudo I had the following error:-
    /sbin/ldconfig: Can’t create temporary cache file /etc/ld.so.cache~: Permission denied

    Thanks

  13. GS Says:

    Exact solution to the issue. Thanks!

Leave a Reply