# RMagick, CentOS 5 64-bit, shared object cannot be dlopen()ed

**URL:** <https://www.ruby-forum.com/t/rmagick-centos-5-64-bit-shared-object-cannot-be-dlopen-ed/114025>\
**Category:** Rails\
**Created:** [September 7, 2007, 7:00am UTC](https://www.ruby-forum.com/t/rmagick-centos-5-64-bit-shared-object-cannot-be-dlopen-ed/114025 "2007-09-07T07:00:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rails.impaired](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d9b06d/32.png) [@rails.impaired](https://www.ruby-forum.com/u/rails.impaired)\
**Post date:** [September 7, 2007, 7:00am UTC](https://www.ruby-forum.com/t/rmagick-centos-5-64-bit-shared-object-cannot-be-dlopen-ed/114025/1 "2007-09-07T07:00:55Z")

</div>

I have two servers. Both are 64-bit boxes. Development server is  
running Ubuntu 7.04 and the production server is running CentOS 5. My  
provider does not offer Ubuntu yet. I’m stuck with CentOS 5 64-bit

I have RMagick installed and working on my development box. I cannot  
get RMagick working on my production box.

/usr/local/bin/ruby -I /home/myusername/install/RMagick-1.15.9/./lib -  
I /home/myusername/install/RMagick-1.15.9/./ext/RMagick  
PreserveAspectRatio.rb  
/home/myusername/install/RMagick-1.15.9/./ext/RMagick/RMagick.so:  
libgomp.so.1: shared object cannot be dlopen()ed - /home/myusername/  
install/RMagick-1.15.9/./ext/RMagick/RMagick.so (LoadError)  
from /home/myusername/install/RMagick-1.15.9/./lib/RMagick.rb:  
11  
from /home/myusername/install/RMagick-1.15.9/./lib/rvg/rvg.rb:  
31:in `require' from /home/myusername/install/RMagick-1.15.9/./lib/rvg/rvg.rb: 31 from PreserveAspectRatio.rb:1:in `require’  
from PreserveAspectRatio.rb:1  
post-setup.rb: PreserveAspectRatio.rb example returned error code 256  
setup.rb: Too many examples failed. Search for “Help!” at  
[http://rmagick.rubyforge.org/install-faq.html](http://rmagick.rubyforge.org/install-faq.html).

Here is the area of focus:  
libgomp.so.1: shared object cannot be dlopen()ed

I am pretty sure that libgomp.so.1 is being resolved and actually  
found, however, I think this message means that the shared object  
cannot be dynamically opened. I have no idea how to move forward. I  
didn’t think setting LD\_LIBRARY\_PATH would make a difference, however,  
I tried setting it anyway. I was right about that one. No  
difference.

Any pointers??

---

<div class="post-metadata">

**Author:** ![rails.impaired](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d9b06d/32.png) [@rails.impaired](https://www.ruby-forum.com/u/rails.impaired)\
**Post date:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/rmagick-centos-5-64-bit-shared-object-cannot-be-dlopen-ed/114025/2 "2007-09-17T13:24:48Z")

</div>

Did you get anywhere with this? I’m stuck with the same problem…

---

<div class="post-metadata">

**Author:** ![rails.impaired](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d9b06d/32.png) [@rails.impaired](https://www.ruby-forum.com/u/rails.impaired)\
**Post date:** [September 17, 2007, 6:35pm UTC](https://www.ruby-forum.com/t/rmagick-centos-5-64-bit-shared-object-cannot-be-dlopen-ed/114025/3 "2007-09-17T18:35:28Z")

</div>

Andrew E. wrote:

> Did you get anywhere with this? I’m stuck with the same problem…

You should be able to fix it by building ImageMagick with the  
–disable-openmp configure script command line option. If that doesn’t  
work, try asking the ImageMagick developers.

---

<div class="post-metadata">

**Author:** ![rails.impaired](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d9b06d/32.png) [@rails.impaired](https://www.ruby-forum.com/u/rails.impaired)\
**Post date:** [September 17, 2007, 9:03pm UTC](https://www.ruby-forum.com/t/rmagick-centos-5-64-bit-shared-object-cannot-be-dlopen-ed/114025/4 "2007-09-17T21:03:20Z")

</div>

On Sep 17, 5:35 pm, Tim H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Andrew E. wrote:
> 
> > Did you get anywhere with this? I’m stuck with the same problem…
> 
> ## You should be able to fix it by building ImageMagick with the –disable-openmp configure script command line option. If that doesn’t work, try asking the ImageMagick developers.
> 
> Posted viahttp://www.ruby-forum.com/.

I’ve given this a go with ./configure --disable-openmp but still get  
the same error. For some reason it still seems to be requesting  
libgomp.so.1.

/usr/local/bin/ruby -I /usr/local/src/RMagick-1.15.10/./lib -I /usr/  
local/src/RMagick-1.15.10/./ext/RMagick InitialCoords.rb  
/usr/local/src/RMagick-1.15.10/./ext/RMagick/RMagick.so: libgomp.so.1:  
shared object cannot be dlopen()ed - /usr/local/src/RMagick-1.15.10/./  
ext/RMagick/RMagick.so (LoadError)  
from /usr/local/src/RMagick-1.15.10/./lib/RMagick.rb:11  
from /usr/local/src/RMagick-1.15.10/./lib/rvg/rvg.rb:31:in  
`require' from /usr/local/src/RMagick-1.15.10/./lib/rvg/rvg.rb:31 from InitialCoords.rb:1:in `require’  
from InitialCoords.rb:1  
post-setup.rb: InitialCoords.rb example returned error code 256

I feel it must be something specific to CentOS 5 as I can hardly find  
a reference to this issue on google. I’ve mailed the ImageMagick guys  
to see if they can throw any light on it.

---

<div class="post-metadata">

**Author:** ![rails.impaired](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d9b06d/32.png) [@rails.impaired](https://www.ruby-forum.com/u/rails.impaired)\
**Post date:** [September 20, 2007, 11:39am UTC](https://www.ruby-forum.com/t/rmagick-centos-5-64-bit-shared-object-cannot-be-dlopen-ed/114025/5 "2007-09-20T11:39:41Z")

</div>

Just to update in case anyone searches getting RMagic going on  
CentOS5…

I simply substituted in GraphicsMagick for ImageMagick and everything  
installs fine.

I probably should have thought of this earlier!

On Sep 17, 8:00 pm, Andrew E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
