【问题标题】:Building mongodb C driver on MacOS在 MacOS 上构建 mongodb C 驱动程序
【发布时间】:2014-05-13 17:44:56
【问题描述】:

我试过这个:

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 的家伙,所以用小词。)

【问题讨论】:

    标签: c macos mongodb driver


    【解决方案1】:

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

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

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

    brew install libtool
    

    【讨论】:

    • 好吧,这让我走得更远了,但是现在我在运行 autogen 时遇到了其他错误:configure:5861: error: possible undefined macro: AC_DISABLE_STATIC 如果这个令牌和其他令牌是合法的,请使用 m4_pattern_allow。请参阅 Autoconf 文档。配置:5862:错误:可能未定义的宏:AC_LIBTOOL_WIN32_DLL 配置:5863:错误:可能未定义的宏:AC_PROG_LIBTOOL
    • 这意味着它仍然找不到libtool。我刚刚测试编译,我只需要安装libtoolautomake
    • 嗯,那我错过了什么。我使用 brew 安装 autoconf 2.69、automake 1.14.1 和 libtool 2.4.2,然后将我的 PATH 设置为包含所有这些的 bin 目录(即,如果我执行“哪个 lib 工具返回预期/usr/local/Cellar(brew的安装点)中的一个)。我仍然收到错误。
    • 那我没有任何想法,抱歉。
    【解决方案2】:

    你也可以使用Homebrew Mac 的包管理器

    brew install mongo-c
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-17
      • 1970-01-01
      • 2016-03-13
      • 2012-03-04
      • 1970-01-01
      • 2016-01-27
      相关资源
      最近更新 更多