dshm8998473 2018-11-29 02:34
浏览 315

pecl在mac上安装mongodb,致命错误:找不到'Security / Security.h'文件

I used pecl to install MongoDB extension on mac, but it fails

I get the following error:

ERROR: 'make' failed

/private/tmp/pear/install/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-rand-common-crypto.c:25:10: fatal error: 'Security/Security.h' file not found

1 error generated.

make: *** [src/libmongoc/src/libmongoc/src/mongoc/mongoc-rand-common-crypto.lo] Error 1

ERROR: `make' failed

What is wrong?

  • 写回答

1条回答 默认 最新

  • dsqe46004 2019-02-19 13:48
    关注

    fixed, the real problem is Security/Security.h can't be found in macOS 10.14.3, and there is another similar problem to CoreFoundation/CFBase.h it can be fixed by following steps:

    cd mongodb-1.5.3/include
    ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Versions/A/Headers/ Security
    ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/ CoreFoundation
    brew install pcre
    make
    

    done

    Attention:"ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Versions/A/Headers/ Security" may be failed because there is a "security" directory in your "include" directory.(MAC OS X's default setting is case-insensitive) My solution is "mv security _security".

    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条