首页 > 解决方案 > Thrift Build 因“src/thrift/transport/TSSLSocket.cpp:43:10: fatal error: 'openssl/opensslv.h' file not found”而停止

问题描述

我试图在我的系统(macOs 10.14.5)上安装 thrift(0.11.0)。为此我下载并提取了 tar 文件。然后我运行以下命令:

./bootstrap.sh
./configure
make
make install

在执行make时,出现以下错误:

src/thrift/transport/TSSLSocket.cpp:43:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>

我尝试安装 openssl 和 cryptography ,它们已经是最新的了。

关于我应该做些什么来解决这个问题的任何建议?

标签: python-2.7thriftmacos-mojave

解决方案


由于您使用的是 macOS,因此我假设 openssl 标头是使用 Homebrew 安装的。如果没有,请像这样安装它们:

brew install openssl

但是,库头本身仍然不会位于系统的通常/usr/include目录中。因此,要将 brew 中的标头添加到大多数编译器将搜索的系统默认包含目录中,请尝试以下操作:

sudo ln -s /usr/local/opt/openssl/include/openssl/ /usr/include/

当我在安装一些 pypy pip 要求时遇到同样的问题时,这对我有用。


推荐阅读