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
  • gdelfino

    Thank you!

  • IringB

    Thanks for the tip!

  • http://dira.ro dira

    Thanks, very useful tip!

  • sv3nrg

    Very, very useful!

  • http://www.lanza.fr/ Lanza

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

  • rc

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

  • ping

    thanks, really useful!

  • George

    Thanks. This helped me as well.

  • http://travisonrails.com Travis

    Awesome, thanks!

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

    /sbin/ldconfig /usr/local/lib

  • Ze

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

  • GMR

    Thanks men!!! you’re a hero to me :D

  • Nick

    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!

  • http://nubiteki.com/ Kris Edison

    Do you know how can I make this process permanent?

  • matt

    HOLY SMOKES, YOU SIR, ARE BEAUTIFUL. PEOPLE HAVE A SECOND LOOK AT THIS!!!!!