# Errors building RMagick on Linux

**URL:** <https://www.ruby-forum.com/t/errors-building-rmagick-on-linux/123079>\
**Category:** Rails\
**Created:** [December 13, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/errors-building-rmagick-on-linux/123079 "2007-12-13T22:06:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [December 13, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/errors-building-rmagick-on-linux/123079/1 "2007-12-13T22:06:05Z")

</div>

Here are the sequence of commands that I’ve done running CentOS 4.3.  
When I do the very last command ‘make’, I get the errors below. Any  
ideas? thanks! chirag

cd /usr/local/src  
wget http://image\_magick.veidrodis.com/image\_magick/ImageMagick.tar.gz  
tar xvzf ImageMagick.tar.gz  
cd ImageMagick-X.Y.Z  
./configure --disable-static --with-modules --without-perl   
–without-magick-plus-plus --with-quantum-depth=8  
make  
make install

wget  
[http://files.rubyforge.mmmultiworks.com/rmagick/RMagick-1.15.11.tar.gz](http://files.rubyforge.mmmultiworks.com/rmagick/RMagick-1.15.11.tar.gz)  
tar zxvf RMagick-1.15.11.tar.gz  
cd RMagick-1.15.4  
./configure  
export LD\_LIBRARY\_PATH=/usr/local/lib  
echo $LD\_LIBRARY\_PATH  
make

* * *

gcc -shared -L/usr/local/lib -L’/usr/local/lib’ -Wl,-R’/usr/local/  
lib’ -o RMagick.so rmutil.o rmilist.o rmdraw.o rmimage.o rmfill.o  
rmmain.o rminfo.o -lMagick -ljpeg -lpng -lz -lm -lpthread -lWand -  
lMagick -ldl -lcrypt -lm -lc  
/usr/bin/ld: /usr/local/lib/libMagick.a(magick\_libMagick\_la-  
animate.o): relocation R\_X86\_64\_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libMagick.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [RMagick.so] Error 1 make[1]: Leaving directory `/usr/local/src/RMagick-1.15.11/ext/  
RMagick’  
setup.rb:655:in `command': system("make") failed (RuntimeError) from setup.rb:664:in `make’  
from setup.rb:1258:in `setup_dir_ext' from setup.rb:1532:in ` **send** ’  
from setup.rb:1532:in `traverse' from setup.rb:1549:in `dive\_into’  
from setup.rb:1530:in `traverse' from setup.rb:1534:in `traverse’  
from setup.rb:1533:in `each' ... 8 levels... from setup.rb:826:in ` **send** ’  
from setup.rb:826:in `invoke' from setup.rb:772:in `invoke’  
from setup.rb:1578  
make: \*\*\* [all] Error 1
