首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >构建mongo c++驱动器

构建mongo c++驱动器
EN

Stack Overflow用户
提问于 2017-10-30 03:57:50
回答 1查看 844关注 0票数 1

在CentOs 7下,我从这里克隆了驱动程序。

当我去构建它时,我会得到一个关于libbson的错误。然而libbson既在LD_LIBRARY_PATH上也在PATH

代码语言:javascript
复制
[idf@njserver build]$ echo $LD_LIBRARY_PATH
/usr/lib64:/usr/local/lib64:/usr/local/lib:/lib64:/usr/lib64:/usr/local/lib64:/usr/local/lib:/lib64:/opt/rh/devtoolset-6/root/usr/lib64:/opt/rh/devtoolset-6/root/usr/lib:/usr/lib64:/usr/local/lib64:/usr/local/lib:/lib64:
[idf@njserver build]$ 

路径

代码语言:javascript
复制
[idf@njserver build]$ echo $PATH
/usr/lib64:/opt/rh/devtoolset-6/root/usr/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/idf/.local/bin:/home/idf/bin
[idf@njserver build]$ 

证明libbson/usr/lib64

代码语言:javascript
复制
[idf@njserver build]$ ls /usr/lib64/libbson*
/usr/lib64/libbson-1.0  /usr/lib64/libbson-1.0.so  /usr/lib64/libbson-1.0.so.0  /usr/lib64/libbson-1.0.so.0.0.0
[idf@njserver build]$

试着建造

代码语言:javascript
复制
[idf@njserver build]$ cmake ..
-- The CXX compiler identification is GNU 6.3.1
-- Check for working CXX compiler: /opt/rh/devtoolset-6/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-6/root/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No build type selected, default is Release
-- The C compiler identification is GNU 6.3.1
-- Check for working C compiler: /opt/rh/devtoolset-6/root/usr/bin/cc
-- Check for working C compiler: /opt/rh/devtoolset-6/root/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at src/bsoncxx/CMakeLists.txt:70 (find_package):
  By not providing "Findlibbson-1.0.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "libbson-1.0", but CMake did not find one.

  Could not find a package configuration file provided by "libbson-1.0"
  (requested version 1.9.0) with any of the following names:

    libbson-1.0Config.cmake
    libbson-1.0-config.cmake

  Add the installation prefix of "libbson-1.0" to CMAKE_PREFIX_PATH or set
  "libbson-1.0_DIR" to a directory containing one of the above files.  If
  "libbson-1.0" provides a separate development package or SDK, be sure it
  has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/idf/builds/mongo-cxx-driver/build/CMakeFiles/CMakeOutput.log".
[idf@njserver build]$ 

不知道为什么会这样?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-10-30 15:47:22

我通过手工编译库 (no,apt等) libbson,libmongo-c驱动程序,最后编译libmongo-cpp驱动程序来解决这个问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47007952

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档