Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: post upgrade to Ubuntu 22.04 - curl error - libldap_r-2.4.so.2 cannot open shared object file.
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Timothe Litt <litt_at_acm.org>
Date: Tue, 31 Jan 2023 12:32:20 -0500
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
> <curl-users_at_lists.haxx.se> wrote:
>
> Did you run ldconfig after your manual changes?
>
>
> Tried now. Still getting same error:
>
> -----------
> $ sudo ldconfig
> [sudo] password for mksarav:
> mksarav_at_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
Received on 2023-01-31
Date: Tue, 31 Jan 2023 12:32:20 -0500
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
> <curl-users_at_lists.haxx.se> wrote:
>
> Did you run ldconfig after your manual changes?
>
>
> Tried now. Still getting same error:
>
> -----------
> $ sudo ldconfig
> [sudo] password for mksarav:
> mksarav_at_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
- application/pgp-signature attachment: OpenPGP digital signature