curl can't find liblber.so and libldap.so in Red Hat Enterprise Linux 5
Issue
When curl on rhel 5.9 is used to query LDAP servers, it can't locate liblber.so and libldap.so:
curl -k --connect-timeout 4 ldap://intlxvm1/ou=profile,dc=example,dc=example,dc=com??one?"(&(objectClass=DUAConfigProfile)(cn=example.com.au))"
curl: (40) The liblber.so LDAP library/libraries couldn't be opened
When a symlink /usr/lib64/liblber.so to /usr/lib64/liblber-2.3.so.0.2.31, curl produce another error:
curl -k --connect-timeout 4 ldap://intlxvm1/ou=profile,dc=example,dc=example,dc=com??one?"(&(objectClass=DUAConfigProfile)(cn=example.com.au))"
curl: (40) The libldap.so LDAP library/libraries couldn't be opened
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.9 (Tikanga)
$ rpm -qf /usr/lib/liblber-2.3.so.0.2.31
openldap-2.3.43-25.el5_8.1
$ rpm -qf /usr/lib/libldap-2.3.so.0.2.31
openldap-2.3.43-25.el5_8.1
ldd /usr/bin/curl
linux-vdso.so.1 => (0x00007fffdf9fd000)
libcurl.so.3 => /usr/lib64/libcurl.so.3 (0x0000003cd3e00000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003cd2600000)
libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x0000003cd3200000)
libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x0000003cd6600000)
libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x0000003cd6a00000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000003cd4600000)
libidn.so.11 => /usr/lib64/libidn.so.11 (0x0000003cd3600000)
libssl.so.6 => /lib64/libssl.so.6 (0x0000003cd5200000)
libcrypto.so.6 => /lib64/libcrypto.so.6 (0x0000003cd4a00000)
libz.so.1 => /lib64/libz.so.1 (0x0000003cd4200000)
libc.so.6 => /lib64/libc.so.6 (0x0000003cd2200000)
/lib64/ld-linux-x86-64.so.2 (0x0000003cd1e00000)
libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x0000003cd6e00000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x0000003cd6200000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003cd3a00000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003cd2e00000)
libsepol.so.1 => /lib64/libsepol.so.1 (0x0000003cd2a00000)
readelf -d /usr/bin/curl
Dynamic section at offset 0xe2c0 contains 34 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libcurl.so.3]
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [libgssapi_krb5.so.2]
0x0000000000000001 (NEEDED) Shared library: [libkrb5.so.3]
0x0000000000000001 (NEEDED) Shared library: [libk5crypto.so.3]
0x0000000000000001 (NEEDED) Shared library: [libcom_err.so.2]
0x0000000000000001 (NEEDED) Shared library: [libidn.so.11]
0x0000000000000001 (NEEDED) Shared library: [libssl.so.6]
0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.6]
0x0000000000000001 (NEEDED) Shared library: [libz.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000c (INIT) 0x4018d8
0x000000000000000d (FINI) 0x408f18
0x000000006ffffef5 (GNU_HASH) 0x400240
0x0000000000000005 (STRTAB) 0x60e860
0x0000000000000006 (SYMTAB) 0x4002a0
0x000000000000000a (STRSZ) 1138 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000015 (DEBUG) 0x0
0x0000000000000003 (PLTGOT) 0x60e4f8
0x0000000000000002 (PLTRELSZ) 1920 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x401158
0x0000000000000007 (RELA) 0x4010f8
0x0000000000000008 (RELASZ) 96 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffe (VERNEED) 0x4010b8
0x000000006fffffff (VERNEEDNUM) 1
0x000000006ffffff0 (VERSYM) 0x400ffa
0x000000006ffffef9 (GNU_LIBLIST) 0x400b88
0x000000006ffffdf7 (GNU_LIBLISTSZ) 340 (bytes)
0x000000006ffffef8 (GNU_CONFLICT) 0x60ed40
0x000000006ffffdf6 (GNU_CONFLICTSZ) 936 (bytes)
0x0000000000000000 (NULL) 0x0
It seems that curl was not compiled using RHEL 5.9 liblber abd libldap to record their soname.
Environment
- Red Hat Enterprise Linux 5.9
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
