error: curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)
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.4sudo 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.2CMake 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