欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

报错:cmake: /usr/local/lib/libcurl.so.4: no version information available (required by cmake)

程序员文章站 2022-06-09 17:42:39
...

报错:cmake: /usr/local/lib/libcurl.so.4: no version information available (required by cmake)

[email protected]:~$ cmake
cmake: /usr/local/lib/libcurl.so.4: no version information available (required by cmake)
Usage

cmake [options] <path-to-source>
cmake [options] <path-to-existing-build>

Specify a source directory to (re-)generate a build system for it in the
current working directory. Specify an existing build directory to
re-generate its build system.

Run ‘cmake --help’ for more information.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

刚刚装了cmake,出错之后,检索到这位大神CHENJIAN在*里给出了完美的解决方式。
下面给出我的解决过程:

[email protected]:~$ locate libcurl.so.4
/home/wangshuai/Downloads/zjuvpn/curl-7.47.0/lib/.libs/libcurl.so.4
/home/wangshuai/Downloads/zjuvpn/curl-7.47.0/lib/.libs/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
[email protected]:~$ ll /usr/local/lib/libcurl.so.4
lrwxrwxrwx 1 root root 16 10月 14 17:40 /usr/local/lib/libcurl.so.4 -> libcurl.so.4.4.0*
[email protected]:~$ sudo rm -rf /usr/local/lib/libcurl.so.4
[email protected]:~$ sudo ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0 /usr/local/lib/libcurl.so.4 
[email protected]:~$ ll /usr/local/lib/libcurl.so.4
lrwxrwxrwx 1 root root 42 10月 20 21:10 /usr/local/lib/libcurl.so.4 -> /usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0
[email protected]:~$ cmake 
Usage

cmake [options] <path-to-source>
cmake [options] <path-to-existing-build>
.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19

原因在于最初的ubuntu环境里已经有了libcurl,如上文中的
/usr/lib/x86_64-linux-gnu/libcurl.so.4
/usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0
而我自己因为安装了curl软件而安装了libcurl库,可能与原本的冲突了。

                                </div>
            <link href="https://csdnimg.cn/release/phoenix/mdeditor/markdown_views-095d4a0b23.css" rel="stylesheet">
                </div>