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

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

wangshuai@wangshuai-TUFx470:~$ 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在stackoverflow里给出了完美的解决方式。
下面给出我的解决过程:

wangshuai@wangshuai-TUFx470:~$ locate libcurl.so.4
/home/wangshuai/Downloads/zju/curl-7.47.0/lib/.libs/libcurl.so.4
/home/wangshuai/Downloads/zju/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
wangshuai@wangshuai-TUFx470:~$ 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*
wangshuai@wangshuai-TUFx470:~$ sudo rm -rf /usr/local/lib/libcurl.so.4
wangshuai@wangshuai-TUFx470:~$ sudo ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0 /usr/local/lib/libcurl.so.4 
wangshuai@wangshuai-TUFx470:~$ 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
wangshuai@wangshuai-TUFx470:~$ 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库,可能与原本的冲突了。

                                

你可能感兴趣的:(转载/记录)