如何解决如何在ubuntu中安装mongodb-c驱动程序并在coturn服务器中使用
我正在使用coturn,并且我想使用mongodb作为数据库 当我运行Turnserver时,它会显示
SQLite supported,default database location is /var/lib/turn/turndb
0: Redis supported
0: PostgreSQL supported
0: MySQL supported
0: MongoDB is not supported
0:
0: Default Net Engine version: 3 (UDP thread per CPU core)
我已经安装了coturn 使用此命令
sudo apt-get install coturn
and然docs说
mongo-c-driver驱动程序包“不自动”提供。 MongoDB 支持将不会被编译,除非您在安装前“手动”安装 TURN服务器编译。参考 https://github.com/mongodb/mongo-c-driver进行安装 司机的指示。
,并尝试按照此guide
安装mongo c驱动程序使用软件包管理器安装libmongoc
apt-get install libmongoc-1.0-0
在Unix上构建环境
在Debian / Ubuntu上:
$ sudo apt-get install cmake libssl-dev libsasl2-dev
配置版本 从git仓库克隆准备构建
$ git clone https://github.com/mongodb/mongo-c-driver.git
$ cd mongo-c-driver
$ git checkout 1.17.0 # To build a particular release
$ python build/calc_release_version.py > VERSION_CURRENT
$ mkdir cmake-build
$ cd cmake-build
$ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
执行构建
在Unix,macOS和Windows(MinGW-W64和MSYS2)上构建¶
$ cmake --build .
$ sudo cmake --build . --target install
和
~/mongo-c-driver/cmake-build$
cmake --build。帮助
返回
Unknown argument help
Usage: cmake --build <dir> [options] [-- [native-options]]
Options:
<dir> = Project binary directory to be built.
--target <tgt> = Build <tgt> instead of default targets.
May only be specified once.
--config <cfg> = For multi-configuration tools,choose <cfg>.
--clean-first = Build target 'clean' first,then build.
(To clean only,use --target 'clean'.)
--use-stderr = Ignored. Behavior is default in CMake >= 3.0.
-- = Pass remaining options to the native tool.
和
生成文档
cmake -DENABLE_MAN_PAGES=ON -DENABLE_HTML_DOCS=ON ..
返回
-- No CMAKE_BUILD_TYPE selected,defaulting to RelWithDebInfo
file VERSION_CURRENT contained BUILD_VERSION 1.17.0
-- Build and install static libraries
-- Using bundled libbson
libbson version (from VERSION_CURRENT file): 1.17.0
-- struct timespec found
Adding -fPIC to compilation of bson_static components
CMake Error at CMakeLists.txt:10 (_message):
Could NOT find Sphinx (missing: SPHINX_EXECUTABLE)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message)
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
build/cmake/FindSphinx.cmake:10 (find_package_handle_standard_args)
src/libbson/CMakeLists.txt:444 (find_package)
-- Configuring incomplete,errors occurred!
See also "/home/user/mongo-c-driver/cmake-build/CMakeFiles/CMakeOutput.log".
See also "/home/user/mongo-c-driver/cmake-build/CMakeFiles/CMakeError.log".
cmake --build . --target mongoc-doc
make: *** No rule to make target 'mongoc-doc'. Stop.
当我重新启动coturn服务器时,它仍然显示不支持mongodb
我该如何解决这个问题
解决方法
sudo apt-get install python3-sphinx
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。