如何在Mac OS X Yosemite上安装mongodb php驱动程序

时间:2018-04-18 10:29:31

标签: php mongodb macos

我尝试使用自制软件安装,但似乎这些文件已被删除,我使用了

sudo pecl install mongodb 

我收到此错误

-I/private/tmp/pear/temp/mongodb/src/MongoDB/Monitoring/ -I/private/tmp/pear/temp/mongodb/src/contrib/ -I/private/tmp/pear/temp/mongodb/src/libmongoc/src/mongoc/ -I/private/tmp/pear/temp/mongodb/src/libbson/src/ -I/private/tmp/pear/temp/mongodb/src/libbson/src/jsonsl/ -I/
private/tmp/pear/temp/mongodb/src/libbson/src/bson/ -DHAVE_CONFIG_H -g -O2 -D_THREAD_SAFE -pthread -c /private/tmp/pear/temp/mongodb/src/libmongoc/src/mongoc/mongoc-crypto-openssl.c  -fno-common -DPIC -o src/libmongoc/src/mongoc/.libs/mongoc-crypto-openssl.o
/private/tmp/pear/temp/mongodb/src/libmongoc/src/mongoc/mongoc-crypto-openssl.c:24:10: fatal error: 'openssl/sha.h' file not found
#include <openssl/sha.h>
         ^~~~~~~~~~~~~~~
1 error generated.
make: *** [src/libmongoc/src/mongoc/mongoc-crypto-openssl.lo] Error 1
ERROR: `make' failed

1 个答案:

答案 0 :(得分:0)

我在他们的错误跟踪页https://github.com/mongodb/mongo-php-driver/issues/523

上找到了解决方法