• Happy Coding

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
  • #1
    Posted by gdelfino on April 25th, 2009 at 12:49 pm

    Thank you!

  • #2
    Posted by IringB on April 29th, 2009 at 4:22 pm

    Thanks for the tip!

  • #3
    Posted by dira on June 2nd, 2009 at 9:22 am

    Thanks, very useful tip!

  • #4
    Posted by sv3nrg on June 9th, 2009 at 7:50 am

    Very, very useful!

  • #5
    Posted by Lanza on June 14th, 2009 at 9:13 pm

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

  • #6
    Posted by rc on August 14th, 2009 at 2:22 pm

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

  • #7
    Posted by ping on August 31st, 2009 at 7:47 am

    thanks, really useful!

  • #8
    Posted by George on September 18th, 2009 at 12:37 am

    Thanks. This helped me as well.

  • #9
    Posted by Travis on October 24th, 2009 at 8:48 pm

    Awesome, thanks!

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

    /sbin/ldconfig /usr/local/lib

  • #10
    Posted by Ze on November 17th, 2009 at 3:07 pm

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

  • #11
    Posted by Nick on January 13th, 2010 at 4:13 am

    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
    Posted by Eso on February 17th, 2010 at 10:16 pm

    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
    Posted by GS on May 20th, 2010 at 3:56 pm

    Exact solution to the issue. Thanks!

Share your opinion! Post your thoughts.