Re: post upgrade to Ubuntu 22.04 - curl error - libldap_r-2.4.so.2 cannot open shared object file.

Timothe Litt via curl-users <[email protected]>
Newsgroups gmane.comp.web.curl.general
Message-ID <[email protected]>
OK, so to track this down:

When you deleted your private curl, did you also remove the libcurl.so. 
from /usr/local/lib (or lib64)?

which -a curl # make sure you know what curl you are running

ldd `which curl`

will list the libraries curl is linked against

look for libcurl.so.* => path

Do the same for the libcurl

both  will list libldap_r-2.4.so.2, or something similar that symlinks 
to it.

  ls -l /usr/lib*/libldap_r* /usr/local/lib*/libldap_r* # list the 
installed instances - on a fedora 37 system, I get:

ls: cannot access '/usr/local/lib*/libldap_r*': No such file or directory
-rwxr-xr-x. 1 root root 15144 Aug 17 23:58 /usr/lib64/libldap_r-2.4.so.2
lrwxrwxrwx. 1 root root    18 Aug 17 23:58 
/usr/lib64/libldap_r-2.4.so.2.0.200 -> libldap_r-2.4.so.2

So the .so.2 is reasonably current for libldap_r-2.4  I don't have a 
Ubuntu machine to see exactly how its setup.

updatedb && locate libldap_r-2.4.so #  do you have a libldap_r at all?  
Is it in a standard place?

If ldap is installed in a non-standard place, you may need to install a 
file in /etc/ld.so.conf.d in order for ldconfig (and thus ld) to find it.

If it's not installed at all, re-install it from your package manager.

A quick websearch indicates that you ubuntu has a newer version (2.5) of 
libldap, so if you're using the curl from their distribution, raise an 
issue with them.

https://packages.ubuntu.com/search?suite=lunar&arch=any&mode=filename&searchon=contents&keywords=libldap

says that you can get libldap_4 rom libldap-dev

In any case, this appears to be a packaging/install issue, not a curl bug.


Timothe Litt
ACM Distinguished Engineer
--------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed.

On 31-Jan-23 11:36, M K Saravanan wrote:
>
>
> On Wed, 1 Feb 2023 at 00:07, Timothe Litt via curl-users 
> <[email protected]> wrote:
>
>     Did you run ldconfig after your manual changes?
>
>
> Tried now. Still getting same error:
>
> -----------
> $ sudo ldconfig
> [sudo] password for mksarav:
> mksarav@ubuntu2204:~$ curl --version
> curl: error while loading shared libraries: libldap_r-2.4.so.2: cannot 
> open shared object file: No such file or directory
> -----------
> with regards,
> Saravanan

-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
OpenPGP_signature (application/pgp-signature, 495 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.