Score:1

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

sc flag

After upgrading to Ubuntu 22.04 when I run the curl command it's giving this error:

/usr/bin/curl: error while loading shared libraries: libldap_r-2.4.so.2: cannot open shared object file: No such file or directory

$ which curl
/usr/bin/curl

Before the upgrade, it was working fine.

I removed the curl using apt and then reinstalled it again, but still getting same error. Any idea how to resolve this issue?

with regards, Saravanan

hr flag
Please [edit] your question to include the output of `curl --version`. On 22.04, `curl` should depend (via `libcurl4`) on `libldap-2.5-0 (>= 2.5.4)` afaik
Yuri Sucupira avatar
cn flag
I think the apt cache is outdated and you need to force a full package upgrade. Hence, check if this command works: `sudo apt update ; sudo apt autoremove ; sudo apt clean ; sudo apt-get check ; sudo apt full-upgrade curl libcurl4 --reinstall -y`
Score:0
US flag

In my case it is impossible do get the version running curl --version because I got the error described above. But when you uninstall and then install curl again, it shows the version it is installing curl (7.85.0-1ubuntu0.2).

Update: I have found a solution, but it involves compile source code. You can follow this steps:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.