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

user4457475 picture user4457475 · May 3, 2015 · Viewed 43.5k times · Source

Hello i have this error when i run curl from tcl error: curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)

curl --version
curl 7.40.0 (x86_64-unknown-linux-gnu) libcurl/7.40.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
root@lasdf :/usr/local/lib$ ll
drwxr-xr-x  5 root root    4096 Feb  4 17:33 ./
drwxr-xr-x 10 root root    4096 Aug  2  2014 ../
-rw-r--r--  1 root root  878996 Feb  4 17:33 libcurl.a
-rwxr-xr-x  1 root root     979 Feb  4 17:33 libcurl.la*
lrwxrwxrwx  1 root root      16 Feb  4 17:33 libcurl.so -> libcurl.so.4.3.0*
lrwxrwxrwx  1 root root      16 Feb  4 17:33 libcurl.so.4 -> libcurl.so.4.3.0*
-rwxr-xr-x  1 root root  472203 Feb  4 17:33 libcurl.so.4.3.0*

Answer

CHENJIAN picture CHENJIAN · Aug 11, 2016

I also had a problem with libcurl.so.4: no version information available in installing CMAKE. I type cmake, the output is:

cmake: /usr/local/lib/libcurl.so.4: no version information available     (required by cmake)
Segmentation fault (core dumped)`

I solved this by doing the following:

First, I locate the path of libcurl.so.4:

locate libcurl.so.4

the result is:

/home/chenjian/software/curl-7.20.0/lib/.libs/libcurl.so.4
/home/chenjian/software/curl-7.20.0/lib/.libs/libcurl.so.4.2.0
/usr/lib/x86_64-linux-gnu/libcurl.so.4
/usr/lib/x86_64-linux-gnu/libcurl.so.4.3.0
/usr/local/lib/libcurl.so.4
/usr/local/lib/libcurl.so.4.2.0

Second, find the link of libcurl.so.4,type:

ls -l /usr/local/lib/libcurl.so.4

the result:

lrwxrwxrwx 1 root root 16 Aug 16 21:15 /usr/local/lib/libcurl.so.4 -> libcurl.so.4.2.0

Third, remove it and rebuild the link to libcurl.so.4.3.0:

sudo rm /usr/local/lib/libcurl.so.4
sudo ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.3.0 /usr/local/lib/libcurl.so.4

Next, check it:

 ls -l /usr/local/lib/libcurl.so.4

well, the output is:

lrwxrwxrwx 1 root root 42 Aug 24 09:23 /usr/local/lib/libcurl.so.4 -> /usr/lib/x86_64-linux-gnu/libcurl.so.4.3.0

Then, I type cmake -version, and the result is

cmake version 3.2.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

After fixing the bug, I think it may be caused by multi-version of curl, like me, the origin ubuntu environment had one, but I install another one.