Hi everyone,
I don’t want to be annoying by saying “it’s fixed” and then coming back to say “actually, it’s not,” but I think I’ve finally solved the issue.
The root of the problem was with the curl
library. I was getting this error:
curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)
curl 8.5.0 (x86_64-pc-linux-gnu) libcurl/8.10.1 OpenSSL/3.0.13 zlib/1.2.13.zlib-ng
Release-Date: 2023-12-06, security patched: 8.5.0-2ubuntu10.6
Protocols: http https
Features: alt-svc AsynchDNS HSTS HTTPS-proxy IPv6 Largefile libz NTLM SSL threadsafe TLS-SRP UnixSockets
WARNING: curl and libcurl versions do not match. Functionality may be affected.
It turned out to be a version conflict between curl
and libcurl
. I followed a few steps to resolve it (which I can share if needed), and after rebooting my machine, everything still works — which wasn’t the case yesterday.
- The
curl
executable: version 8.5.0 (from Ubuntu). - The
libcurl.so.4
dynamic library: version 8.10.1, installed in/usr/local/lib/
.
The Problem
A custom version of libcurl
was installed in /usr/local/lib/
, likely built from source, and it’s interfering with Ubuntu’s default curl
binary, which expects a different version.
This causes:
-
Runtime symbol errors like:
undefined reference to `curl_global_init@CURL_OPENSSL_4`
-
And warnings such as:
WARNING: curl and libcurl versions do not match.
Recommended Fix: Remove the conflicting /usr/local/lib
version
Step 1: Check if the custom version exists
ls -l /usr/local/lib/libcurl*
If you see output like:
/usr/local/lib/libcurl.so
/usr/local/lib/libcurl.so.4
/usr/local/lib/libcurl.so.4.8.10
Then the custom installation is indeed present and causing issues.
Step 2: Remove the manual installation
sudo rm /usr/local/lib/libcurl.so*
This won’t break your system as long as
libcurl
is properly installed via APT.
Step 3: Regenerate the shared library cache
sudo ldconfig
Step 4: Verify the system version is now used
ldd $(which curl) | grep libcurl
Expected output:
libcurl.so.4 => /usr/lib/x86_64-linux-gnu/libcurl.so.4
Step 5: Reinstall the official version (just in case)
sudo apt install --reinstall libcurl4-openssl-dev
Expected Result
Now when you run:
curl --version
Hope this helps someone else.
Cheers!