Sunday, May 07, 2006

 

Apache on RHEL 3 (undefined symbol: gdbm_errno)

While trying to enable web based admin gui for our sun ray server, I discovered that, httpd on RHEL 3 has some problems with libraries.

[root@manhattan root]# httpd
httpd: relocation error: /usr/lib/libaprutil-0.so.0: undefined symbol: gdbm_errno

Since I had not installed or changed anything after installing RedHat Enterprise Linux AS 3, I believe, this bug comes packaged with the distribution. And I expect Red Hat to test their software more carefully, at least httpd.

To debug, I checked dependencies for libaprutil-0.so.0 and symbols in libgdbm.so. To my surprise, gdbm_errno was in the libgdbm.so, and httpd should not have reported error. Everything (LD_LIBRARY_PATH and ld.so.cache) was fine.

[root@manhattan root]# rpm -aq | grep httpd
httpd-2.0.46-54.ent
redhat-config-httpd-1.1.0-4.30.2

[root@manhattan root]# rpm -aq | grep gdbm
gdbm-devel-1.8.0-20
gdbm-1.8.0-20

[root@manhattan root]# ldd -d /usr/lib/libaprutil-0.so.0
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00cc8000)
        libc.so.6 => /lib/tls/libc.so.6 (0x008c2000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00216000)
undefined symbol: gdbm_errno    (/usr/lib/libaprutil-0.so.0)
undefined symbol: apr_pool_cleanup_null (/usr/lib/libaprutil-0.so.0)

[root@manhattan root]# nm --dynamic /usr/lib/libgdbm.so | grep gdbm_errno
000061c4 D gdbm_errno

After trying out many things and googling, I was able to fix the problem. Before starting httpd, I had to run

[root@manhattan root]# export LD_PRELOAD=/usr/lib/libgdbm.so.2

I am not sure why and how it worked and why exactly was their a problem in the first place. This will probably remain a mystery for me.


Comments:
Nilesh Bansal,

Thank you very, very, very much for posting this solution. I have been struggling with this for days using subversion and apache.

BTW: I am in Australia and I was in Toronto, Canada Last week (10/06/2006 - 07/07/2006) visiting family and friends. Wish I had seen this earlier. I would have taken you out for lunch and drinks.
Hope to meet you next time I am in Canada.

Lakshman
 
Here is a link that explains LD_PRELOAD
http://neworder.box.sk/newsread.php?newsid=13857
 
I have to say Thank You VERY much as well for posting this solution! Finally relief. I was dreading this issue causing my development work to be delayed...

Cheers!
 
Thanks for posting.

I ran into the same problem on a CentOS 4.4 environment.

The only thing I can think of odd for this system is that I have the default apache running along side of the apache installed with the groundwork opensource monitor.
 
Oes Tsetnoc one of the ways in which we can learn seo besides Mengembalikan Jati Diri Bangsa. By participating in the Oes Tsetnoc or Mengembalikan Jati Diri Bangsa we can improve our seo skills. To find more information about Oest Tsetnoc please visit my Oes Tsetnoc pages. And to find more information about Mengembalikan Jati Diri Bangsa please visit my Mengembalikan Jati Diri Bangsa pages. Thank you So much.
Oes Tsetnoc | Semangat Mengembalikan Jati Diri Bangsa
 
Post a Comment

Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?