相关文章推荐
玩篮球的茴香  ·  [CMake教程] ...·  4 周前    · 
怕老婆的大熊猫  ·  vcpkg_cmake_configure ...·  4 天前    · 
纯真的黑框眼镜  ·  android ...·  1 年前    · 
风流的火柴  ·  Session与JWT - ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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

Ask Question

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*
                This implies that you're using a mismatched curl and libcurl. e.g. curl installed by your package manager and libcurl compiled yourself.
– Wodin
                Mar 29, 2019 at 8:13

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.

Great Answer! A correction: In sudo rm -rf /usr/local/lib/libcurl.so.4, -rf is not needed. – Zheng Qu May 18, 2018 at 9:03 This resolves my issue, but I'm curious the problem always gets back after a while on my Ubuntu 18.04 system. – haxpor Jul 16, 2019 at 6:33 @Krishnaraj I'm not sure what happens but I've moved on to 19.10 and I didn't see any problem now. – haxpor May 19, 2020 at 8:09

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
                You should really remove that --prefix. It could really mess someone up if PWD is for example in their home directory.
– Jeffrey Van Alstine
                Jul 29, 2021 at 22:30
                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!
– Daryl
                Mar 26, 2022 at 1:07

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

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. – Elijah Lynn Dec 28, 2017 at 20:34

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# 
                After removing the existing libcurl sudo apt-get install libcurl4-openssl-dev worked for me.
– GANESH B K
                Aug 5, 2019 at 18:51

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)

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.