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.
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.
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 | Semangat Mengembalikan Jati Diri Bangsa
Links to this post: