在MacOS上构建mongodb C驱动程序

时间:2014-05-13 17:44:56

标签: c macos mongodb driver

我试过了:

git clone git://github.com/mongodb/mongo-c-driver.git 
cd mongo-c-driver 
./autogen.sh --prefix=/usr --libdir=/usr/lib64

输出:

Error: libtoolize was not found on your system. Cannot continue.
On Darwin, this is named glibtoolize
Submodule 'src/libbson' (git://github.com/mongodb/libbson.git) registered for path 'src/libbson'
Cloning into 'src/libbson'...
remote: Reusing existing pack: 5211, done.
remote: Counting objects: 66, done.
remote: Compressing objects: 100% (65/65), done.
remote: Total 5277 (delta 35), reused 2 (delta 0)
Receiving objects: 100% (5277/5277), 5.18 MiB | 2.22 MiB/s, done.
Resolving deltas: 100% (3463/3463), done.
Checking connectivity... done.
Submodule path 'src/libbson': checked out '5fafb63060b08c477fa8e243e07de40869de691d'
Error: libtoolize was not found on your system. Cannot continue.
On Darwin, this is named glibtoolize
Error: autoreconf not found, please install it.
Error: autoreconf not found, please install it.

我该如何解决这个问题? (对不起......通常不是C家伙,所以请用小词。)

2 个答案:

答案 0 :(得分:1)

您需要安装libtool。最简单的是用Homebrew来做。如果您还没有安装Homebrew,可以使用简单的命令安装它:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

您可以在site找到更多信息。安装Homebrew后,您可以轻松安装libtool

brew install libtool

答案 1 :(得分:0)

您还可以使用适用于Mac的Homebrew软件包管理器

brew install mongo-c