使用pecl在OS X El Capitan(v10.11.1)上安装Mongodb驱动程序 [英] Using pecl to install the Mongodb driver on OS X El Capitan (v10.11.1)

查看:86
本文介绍了使用pecl在OS X El Capitan(v10.11.1)上安装Mongodb驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为OS X安装php mongo驱动程序.我尝试按照

I am trying to install the php mongo driver for OS X. I've tried following these instructions to no avail.

$ which pecl-> /usr/local/Cellar/php56/5.6.13_2/bin/pecl

$ sudo pecl install mongo->完整构建结果此处,但问题是错误:

$ sudo pecl install mongo -> full build results here but the problem the is the error:

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).

My Xcode command-line tools are up to date (I used $ xcode-select --install to be sure).

我确定如何解决此问题.

I'm sure how to fix this problem.

推荐答案

我设法通过使用Homebrew(

I managed to get around this by installing OpenSSL using Homebrew (as suggested here):

$ brew install openssl
$ brew link openssl --force

然后

$ sudo pecl install mongodb

这篇关于使用pecl在OS X El Capitan(v10.11.1)上安装Mongodb驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆