20090113 ldapsearch fatal libldap50so open failed - plembo/onemoretech GitHub Wiki

title: ldapsearch: fatal: libldap50.so: open failed link: https://onemoretech.wordpress.com/2009/01/13/ldapsearch-fatal-libldap50so-open-failed/ author: lembobro description: post_id: 401 created: 2009/01/13 19:19:12 created_gmt: 2009/01/13 19:19:12 comment_status: open post_name: ldapsearch-fatal-libldap50so-open-failed status: publish post_type: post

ldapsearch: fatal: libldap50.so: open failed

If you get this error:

"ld.so.1: ldapsearch: fatal: libldap50.so: open failed: No such file or directory"

when trying to execute any of the scripts or utilities that come with Sun’s Java System Directory server, you need to get $DSHOME/lib path into $LD_LIBRARY_PATH (where $DSHOME is the install location for JSDS). For example, on one of my systems JSDS is installed to /opt/sun/directory52, and so I’ve added the following line to the system user profile (in my case a user named ldap):

export LD_LIBRARY_PATH=/opt/sun/directory52/lib:$LD_LIBRARY_PATH

There are other ways to do this. For example on Red Hat or Ubuntu you could add this path to /etc/ld.so.conf and then run ldconfig to effect the change.

Copyright 2004-2019 Phil Lembo