我正在尝试为 OS X 安装 php mongo 驱动程序。我已尝试关注 these instructions无济于事。
$ which pecl
-> /usr/local/Cellar/php56/5.6.13_2/bin/pecl
$ sudo pecl install mongo
-> 完整构建结果 here但问题是错误:
In file included from /private/tmp/pear/install/mongo/io_stream.c:34:
/private/tmp/pear/install/mongo/contrib/php-ssl.h:33:10: fatal error: 'openssl/evp.h' file not found
#include <openssl/evp.h>
我的 Xcode 命令行工具是最新的(我确实使用了 $ xcode-select --install
)。
我知道如何解决这个问题。
最佳答案
我通过使用 Homebrew (as suggested here) 安装 OpenSSL 设法解决了这个问题:
$ brew install openssl
$ brew link openssl --force
然后
$ sudo pecl install mongodb
关于php - 使用 pecl 在 OS X El Capitan (v10.11.1) 上安装 Mongodb 驱动程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33483210/