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*
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.
On my Ubuntu 12.04 system, this error was emitted when running /usr/bin/curl
(from the curl
installable package) when there was a /usr/local/bin/curl
in place already. Do a which curl
and see which one is executing -- if it's /usr/bin/curl
, try executing /usr/local/bin/curl
instead.
I ran into this in the context of crontab, which runs with a different path from my user. The quick fix was to specify my curl
s explicitly with /usr/local/bin/curl
As to me, my system is ubuntu16 having a default curl. But I install a curl by source code.
root@xy:~/cmake_practice/cmake_build/build_demo9# locate libcurl.so.4
/home/xy/anaconda2/lib/libcurl.so.4
/home/xy/anaconda2/lib/libcurl.so.4.4.0
/home/xy/anaconda2/pkgs/curl-7.55.1-hcb0b314_2/lib/libcurl.so.4
/home/xy/anaconda2/pkgs/curl-7.55.1-hcb0b314_2/lib/libcurl.so.4.4.0
/usr/lib/x86_64-linux-gnu/libcurl.so.4
/usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0
/usr/local/lib/libcurl.so.4
/usr/local/lib/libcurl.so.4.4.0
Then i see the new libcurl.so I install recently(May 20 19:54):
root@xy:~/cmake_practice/cmake_build/build_demo9# ll -th /usr/local/lib/libcurl.so.4
lrwxrwxrwx 1 root root 16 May 20 19:54 /usr/local/lib/libcurl.so.4 -> libcurl.so.4.4.0*
And then i rm them:
root@xy:~/cmake_practice/cmake_build/build_demo9# rm -f /usr/local/lib/libcurl.so.4
root@xy:~/cmake_practice/cmake_build/build_demo9# rm -f /usr/local/lib/libcurl.so.4.4.0
check it:
root@xy:~/cmake_practice/cmake_build/build_demo9# cmake --version
cmake version 3.5.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
root@xy:~/cmake_practice/cmake_build/build_demo9#
here I have a simple solution.
You may installed libcurl and ran into the issue.
But you can solve it by merely rebuilding your own cmake with the libcurl you installed (use LD_LIBRARY_PATH to point to your libcurl)
Works for me. (Ubuntu 16.04, libcurl 4.5 and cmake 3.11.3)
On the latest ubuntu (18.4) I had to
sudo apt-get remove libcurl.
and then reinstall what is needed, e.g., curl
In my ubuntu 16.04, I came across the same problem when I export anaconda bin to PATH
and lib to LD_LIBRARY_PATH
. I solved it by installing cmake from conda-forge: conda install cmake
. If you use anaconda as me, you can use this method to fix it, otherwise use others' solutions.