How to Fix “libcurl.so.4: no version information available” Error in Linux Systems


4 views

Many Linux administrators encounter this puzzling behavior where deleting /usr/local/lib/libcurl.so.4 temporarily resolves the version warning, only for the symlink to magically reappear within 24-48 hours. Let's examine why this happens and how to properly fix it.

The core issue stems from having multiple curl installations conflicting with each other. Your system shows:

$ apt --installed list | grep 'curl'
curl/trusty-updates,trusty-security,now 7.35.0-1ubuntu2.5 amd64 [installed]
libcurl3/trusty-updates,trusty-security,now 7.35.0-1ubuntu2.5 amd64 [installed]

Meanwhile, you have a manually compiled version in /usr/local/lib with version 4.3.0, which lacks proper version information tags.

First, verify all curl installations on your system:

$ find /usr -name "*libcurl*" -ls
$ which -a curl
$ curl --version

The daily reappearance at 8:00:01 AM strongly suggests a cron job or system maintenance script is recreating the symlink. Common culprits include:

  • Package maintainer scripts (/var/lib/dpkg/info/)
  • Alternative installations (like custom PHP builds)
  • System update daemons

Option 1: Reconcile Library Paths

$ sudo update-alternatives --config libcurl.so
$ sudo ldconfig -v | grep curl

Option 2: Force System to Use Package Version

$ sudo rm /usr/local/lib/libcurl.*
$ sudo apt-get install --reinstall libcurl3
$ sudo ldconfig

Option 3: Recompile with Version Info

If you need the custom version, rebuild with proper version tags:

$ ./configure --with-version-symbols
$ make clean
$ make
$ sudo make install

Add this to your /etc/ld.so.conf.d/custom.conf:

/usr/lib/x86_64-linux-gnu
/usr/local/lib

Then run:

$ sudo ldconfig

Verify the fix with:

$ ldd $(which curl) | grep curl
$ strings /usr/local/lib/libcurl.so.4 | grep CURL

The output should now show proper version information when present.


When working with curl on Ubuntu 14.04 (Trusty), you might encounter this puzzling warning that appears in system logs and cron emails:

curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)

What makes this particularly strange is that the file keeps regenerating even after deletion, typically around 8:00 AM after daily cron jobs execute.

The root issue stems from having multiple curl installations conflicting with each other. Your system shows:

$ apt --installed list | grep 'curl'
curl/trusty-updates,trusty-security,now 7.35.0-1ubuntu2.5 amd64 [installed]
libcurl3/trusty-updates,trusty-security,now 7.35.0-1ubuntu2.5 amd64 [installed]

Meanwhile, there's a manually compiled version in /usr/local/lib:

libcurl.so.4 -> libcurl.so.4.3.0
libcurl.so.4.3.0

The symbolic link recreation suggests either:

  • A cron job running ldconfig
  • A package maintenance script
  • Some application's post-install routine

Here are three approaches to permanently resolve this:

Option 1: Remove Compilation Artifacts

If you don't need the manually compiled version:

sudo rm /usr/local/lib/libcurl.*
sudo ldconfig

Option 2: Recompile with Version Information

If you need the local version, rebuild with proper versioning:

wget https://curl.haxx.se/download/curl-7.68.0.tar.gz
tar -xvzf curl-7.68.0.tar.gz
cd curl-7.68.0
./configure --prefix=/usr/local --with-ssl
make
sudo make install

Option 3: Redirect Library Path

Modify ldconfig to prioritize system libraries:

sudo echo "/usr/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/curl-x86_64.conf
sudo ldconfig

After implementing any solution, verify with:

ldd $(which curl) | grep curl
curl --version

The output should show the system libcurl and version information should appear properly.