当前位置:   article > 正文

cmake的安装一路解决问题_libicudata.so

libicudata.so

前言:

    今天开始一个新的项目,从git上面拉取到了项目的代码,这个项目用的是cmake编译的,之前还没有用过cmake,所以应该是要安装一下

1.先用已经存在的脚本试着运行一下

./cmk: line 48: cmake: command not found

提示cmake命令不存在,果然是要安装一下

2.安装cmake

sudo apt install cmake

3.装完之后,再运行一下

cmake: error while loading shared libraries: librtmp.so.0: cannot open shared object file: No such file or directory

提示librtmp.so.0这个库不存在,,查了一下发现我的虚拟机上这个库在/usr/local/lib/目录下面

4.按照网上的方法,把路径写到/etc/ld.so.conf下面

  1. vi /etc/ld.so.conf
  2. sudo vi /etc/ld.so.conf
  3. /sbin/ldconfig -v

结果还是不行

5.经过同事提醒,确认cmake是否安装上了,使用ldd命令查看库的依赖关系(惭愧,ldd命令之前可能见过没用过。。。,)

whereis cmake

  1. zqq@zqq-virtual-machine:~$ whereis cmake
  2. cmake: /usr/bin/cmake /usr/local/lib/cmake /usr/share/man/man1/cmake.1.gz

ldd /usr/bin/cmake

  1. zqq@zqq-virtual-machine:~$ ldd /usr/bin/cmake
  2. /usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
  3. linux-vdso.so.1 => (0x00007ffc0419f000)
  4. libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8c2fb9f000)
  5. libz.so.1 => /usr/local/lib/libz.so.1 (0x00007f8c2f983000)
  6. libarchive.so.13 => /usr/lib/x86_64-linux-gnu/libarchive.so.13 (0x00007f8c2f6e0000)
  7. libcurl.so.4 => /usr/local/lib/libcurl.so.4 (0x00007f8c2f469000)
  8. libjsoncpp.so.1 => /usr/lib/x86_64-linux-gnu/libjsoncpp.so.1 (0x00007f8c2f238000)
  9. libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8c2eeb6000)
  10. libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8c2eca0000)
  11. libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8c2e8d6000)
  12. /lib64/ld-linux-x86-64.so.2 (0x00007f8c2fda3000)
  13. libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007f8c2e6a0000)
  14. libattr.so.1 => /lib/x86_64-linux-gnu/libattr.so.1 (0x00007f8c2e49b000)
  15. liblzo2.so.2 => /lib/x86_64-linux-gnu/liblzo2.so.2 (0x00007f8c2e279000)
  16. liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f8c2e057000)
  17. libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f8c2de47000)
  18. libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f8c2da8c000)
  19. librtmp.so.0 => not found
  20. libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f8c2d823000)
  21. libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f8c2d3de000)
  22. libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f8c2d18d000)
  23. liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f8c2cf7e000)
  24. libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8c2cd61000)
  25. libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8c2ca58000)
  26. libicuuc.so.55 => /usr/lib/x86_64-linux-gnu/libicuuc.so.55 (0x00007f8c2c6c4000)
  27. libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f8c2c4a9000)
  28. libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f8c2c28e000)
  29. libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007f8c2c04d000)
  30. libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f8c2bd1d000)
  31. libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f8c2a266000)
  32. libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007f8c2a05d000)
  33. libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007f8c29dd3000)
  34. libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007f8c29b31000)
  35. libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f8c2992d000)
  36. libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007f8c296fa000)
  37. libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007f8c294e4000)
  38. libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f8c29280000)
  39. libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007f8c2904d000)
  40. libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f8c28e3a000)
  41. libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007f8c28c07000)
  42. libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f8c28987000)
  43. libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007f8c2875e000)
  44. libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007f8c2854f000)
  45. libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007f8c28304000)
  46. libsqlite3.so.0 => /usr/local/lib/libsqlite3.so.0 (0x00007f8c28007000)
  47. libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f8c27dcf000)
  48. libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f8c27bc7000)
  49. zqq@zqq-virtual-machine:~$ cd /usr/lib/x86_64-linux-gnu/

 

存在两个问题

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

2.librtmp.so.0 => not found

libcurl.so.4网上查说是冲突了  librtmp.so.0动态库没找到

解决方法:

1. ldconfig -p | grep libcurl.so.4使用这条命令查看libcurl.so.4的路径,

  1. zqq@zqq-virtual-machine:/usr/lib/x86_64-linux-gnu$ ldconfig -p | grep libcurl.so.4
  2. libcurl.so.4 (libc6,x86-64) => /usr/local/lib/libcurl.so.4
  3. libcurl.so.4 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcurl.so.4

 删除掉/usr/local/lib/libcurl.so.4,使用软连接到usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0

  1. zqq@zqq-virtual-machine:/usr/lib/x86_64-linux-gnu$ sudo rm -rf /usr/local/lib/libcurl.so.4
  2. zqq@zqq-virtual-machine:/usr/lib/x86_64-linux-gnu$ sudo ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0 /usr/local/lib/libcurl.so.4

2.看到cmake的库依赖基本上都在/usr/lib/x86_64-linux-gnu/这个路径,把librtmp.so.0复制到前面的路径下面

最终:

cmake -version查看信息正常

  1. zqq@zqq-virtual-machine:~/share/work/indoor/anyka3760d$ cmake -version
  2. cmake version 3.5.1
  3. CMake suite maintained and supported by Kitware (kitware.com/cmake).


 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/190971
推荐阅读
  

闽ICP备14008679号