在MacOS Sierra上找不到OpenSSL [英] OpenSSL not found on MacOS Sierra

查看:364
本文介绍了在MacOS Sierra上找不到OpenSSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装PHP MongoDB驱动程序,但安装失败,因为它无法找到OpenSSL.

I am trying to install a PHP MongoDB driver but the installation is failing because it cannot locate the OpenSSL.

/Users/username/mongo-php-driver/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

我读到这与最新版本的MacOS有关吗?有办法做到这一点,因为我确实需要安装该驱动程序.

I read that this has something to do with the latest version of MacOS? Is there a way to do it, as I really need to install this driver.

推荐答案

这是唯一对我有用的解决方案.

This is the only solution that worked for me.

cd /usr/local/include 
ln -s ../opt/openssl/include/openssl .

来源: https://www .anintegratedworld.com/mac-osx-fatal-error-opensslsha-h-file-not-found/

这篇关于在MacOS Sierra上找不到OpenSSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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