LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2011, 02:19 PM   #1
x201s
Member
 
Registered: Dec 2010
Posts: 67

Rep: Reputation: 0
slapd: error while loading shared libraries


A newbie trying his hand with openldap.

Disclosure: I tried posting at openldap forum, but my message does not appear in the mailing list-- and I didn't receive anything back from that forum, so please don't flame.

I use red hat 5.5.
I didn't want to use the openldap that is bundled with and installed by the
red hat, so I downloaded and installed BerkeleyDB-4.8.30 and openldap-2.4.23.

configure, make as a non-root
make install as a root user.

I specified --prefix=/usr/local in both cases.

For openldap, I had to export CPPFLAGS, LDFLAGS and LD_LIBRARY_PATH as
follows:

export CPPFLAGS="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib"
export LD_LIBRARY_PATH="-I/usr/local/lib"

I created a slapd file and put it in /etc/init.d, chmod and chkconfig
successfully.

In .bashrc file, I put /usr/local/sbin and /usr/local/lib in the path. I
also added this line:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

I was able to run slappasswd and set/create a password for root.

But that was the end of my successes.

As a root user, when I type "service slapd start", I get this error:

Code:
Starting slapd
/usr/local/libexec/slapd: error while loading shared libraries:
libdb-4.8.so cannot open shared object file no such file or dir.
Is it because my BerkeleyDB installation isn't working properly? (I don't
recall any errors while installing BDB though) or something more is amiss?

I can see that the file libdb-4.8.so is in /usr/local/lib and /usr/local/lib is in my path (in my .bashrc).. so why not "read" it from there?

How do I solve this problem?

Thank you all for taking time to read.

Cheers,
 
Old 01-13-2011, 02:34 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,526

Rep: Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503
Hi,

Running
Code:
ldd /usr/local/libexec/slapd
should show where slapd looks for libdb
 
Old 01-14-2011, 03:45 AM   #3
x201s
Member
 
Registered: Dec 2010
Posts: 67

Original Poster
Rep: Reputation: 0
bathory:
Thank you for the tip.

ldd /usr/local/libexec/slapd gave me

libdb-4.8.so -> /usr/local/lib/libdb-4.8.so (0x00+++)

The problem was that LD_LIBRARY_PATH that I set in .bashrc was gone.
The 'service' somehow cleared the export stuffs that was set in the .bashrc.

I have solved this one by adding /usr/local/lib in in a file under /etc/ld.so.conf.d
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libtermcap.so.2: cannot open shared object file astroboy2000ir Linux - Software 3 12-08-2010 12:16 AM
error while loading shared libraries: libhid.so.0: cannot open shared object file: No misungs Linux - Software 4 06-10-2009 01:05 PM
gxine: error while loading shared libraries: libmozjs.so: cannot open shared object.. khronosschoty Slackware 10 11-10-2008 08:33 PM
error while loading shared libraries: libstdc++.so.5: cannot open shared object file PaulyWally Debian 2 10-18-2008 06:59 PM
error while loading shared libraries: libgvc.so.3: cannot open shared object file coolrock Slackware 6 01-17-2007 06:10 PM


All times are GMT -5. The time now is 12:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration