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

7

35

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*
Tuber answered 3/5, 2015 at 17:59 Comment(1)
This implies that you're using a mismatched curl and libcurl. e.g. curl installed by your package manager and libcurl compiled yourself.Thayer
I
97

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.

Interventionist answered 11/8, 2016 at 12:53 Comment(6)
why is this answer below the other one?Omasum
Great Answer! A correction: In sudo rm -rf /usr/local/lib/libcurl.so.4, -rf is not needed.Eames
This resolves my issue, but I'm curious the problem always gets back after a while on my Ubuntu 18.04 system.Creekmore
@Creekmore I am facing similar issue, did you manage to resolve it?Emanuel
@Emanuel I'm not sure what happens but I've moved on to 19.10 and I didn't see any problem now.Creekmore
This has to be the single most helpful answer I've ever come across on stackoverflow. Solved so many similar issues, i.e. libstdc++.so.6 'GLIBCXX_3.4.30' not found, libuuid.so.1 no version information, and many more. Thanks a lot!Bookrack
C
14

I encountered this problem while building a newer version of curl 7.5.61 and then rebuilding my application. The solution for me was to set the --enable-versioned-symbols which is disabled by default.

./configure --enable-versioned-symbols
Configuration answered 28/6, 2019 at 11:3 Comment(2)
You should really remove that --prefix. It could really mess someone up if PWD is for example in their home directory.Eliathas
Thanks a bunch for the suggestion on enabled-versioned-symbols. I was building from source and didn't realize I was just not configuring it right at the install. This really helped a bunch!Bittencourt
P
7

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.

Purgatory answered 17/11, 2018 at 12:23 Comment(1)
This solution worked for me thank you!Anemography
S
4

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 curls explicitly with /usr/local/bin/curl

Saturate answered 1/6, 2015 at 16:58 Comment(1)
Thanks, had this same issue. I went ahead and apt-get remove curl which removed /usr/bin/curl (version 7.35) and then linked it to my /usr/local/bin/curl (version 7.46) with sudo ln -s /usr/local/bin/curl /usr/bin/curl.Fricassee
I
2

On the latest ubuntu (18.4) I had to sudo apt-get remove libcurl.
and then reinstall what is needed, e.g., curl

Ironmonger answered 10/7, 2018 at 15:17 Comment(1)
After removing the existing libcurl sudo apt-get install libcurl4-openssl-dev worked for me.Urn
T
1

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# 
Turdine answered 21/5, 2018 at 1:48 Comment(0)
C
0

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)

Contagium answered 12/6, 2018 at 12:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.