簡體   English   中英

在XAMPP上安裝MongoDB驅動程序時出錯(OS X / El Capitan)

[英]Error Installing MongoDB driver on XAMPP (OS X/El Capitan)

我不是XAMPP,PHP或MongoDB的新手,但我是Mac的新手,因此設置PHP MongoDB驅動程序會讓我遇到更多麻煩。

當我嘗試從/applications/xampp/xamppfiles/bin運行$ sudo pecl install mongodb出現此錯誤:

configure: error: Cannot find OpenSSL's <evp.h>
ERROR: `/private/tmp/pear/install/mongodb/configure --with-php-config=/usr/bin/php-config' failed

因為我對Mac很新,我甚至不確定如何處理這個錯誤。 我使用which openssl來查看是否安裝了OpenSSL,並返回/usr/bin/openssl

任何人都可以建議如何解決這個問題?

對我有用的是使用Brew的OpenSSL頭文件:

  1. 安裝brew
  2. 使用brew install opensslbrew install openssl
  3. 安裝pecl模塊時使用openssl頭文件: C_INCLUDE_PATH=/usr/local/opt/openssl/include bin/pecl install mongodb

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM