Monday, January 24, 2011

/usr/bin/ld: cannot find -lperl collect2: ld returned 1 exit status make: *** [blib/arch/auto/Image/Magick/Magick.so] Error 1

Normally this error occurs when install ImageMagick on Ubuntu Linux.
-------------------------------------------------------------------------------
/usr/bin/ld: cannot find -lperl
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/Image/Magick/Magick.so] Error 1
---------------------------------------------------------------------------------

And Solution is : Its need this package.

sudo apt-get install libperl-dev

after that, RMagick gem installed without any issue.
gem install rmagick
Building native extensions.  This could take a while...
Successfully installed rmagick-2.13.1
1 gem installed
Installing ri documentation for rmagick-2.13.1...

2 comments:

Anonymous said...

Thanks, this helped to solve an issue that was plaguing me.

Shrikant Lokhande said...

Yes, Sure..!
Please comment with your Google account to identify you.

Thanks-
Shrikant