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 opencv 无法读取视频
  • ¥15 用matlab 实现通信仿真
  • ¥15 按键修改电子时钟,C51单片机
  • ¥60 Java中实现如何实现张量类,并用于图像处理(不运用其他科学计算库和图像处理库))
  • ¥20 5037端口被adb自己占了
  • ¥15 python:excel数据写入多个对应word文档
  • ¥60 全一数分解素因子和素数循环节位数
  • ¥15 ffmpeg如何安装到虚拟环境
  • ¥188 寻找能做王者评分提取的
  • ¥15 matlab用simulink求解一个二阶微分方程,要求截图