需要配置 Thrift libcrypto

发布于 2025-01-02 05:34:29 字数 152 浏览 1 评论 0原文

我在 Linux 上安装了 Openssl、Openssl-dev。当我配置 Thrift 时,出现此错误:

checking for BN_init in -lcrypto... no
配置:错误:“错误:需要 libcrypto。”

请指教!

I installed Openssl, Openssl-dev on Linux. When I configure Thrift, I get this error:

checking for BN_init in -lcrypto... no
configure: error: "Error: libcrypto required."

Please advise!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

烟凡古楼 2025-01-09 05:34:29

在 Ubuntu 上安装 libssl-dev 包应该可以修复它。如果您使用其他发行版,包名称应该相似。

On Ubuntu installing libssl-dev package should fix it. If you use another distro, package name should be similar.

ぃ弥猫深巷。 2025-01-09 05:34:29

在 debian 8 上,sudo apt-get install libssl1.0-dev 解决了该问题。

On debian 8, sudo apt-get install libssl1.0-dev solves the issue.

深白境迁sunset 2025-01-09 05:34:29

在 Amazon Linux(可能还有 CentOS/Fedora/RHEL)上,您需要安装 openssl-devel

On Amazon Linux (and possibly CentOS/Fedora/RHEL), you will need to install openssl-devel

被翻牌 2025-01-09 05:34:29

在 Ubuntu 18.04 上,运行以下命令:
sudo apt install libssl1.0-dev

on Ubuntu 18.04, run this:
sudo apt install libssl1.0-dev

不语却知心 2025-01-09 05:34:29

我也满足同样的条件;然后寻找 config.log 的详细信息尝试修复它,

试试这个:

LDFLAGS='-L/usr/local/ssl/lib' LIBS='-ldl' ./configure --prefix=/usr/local/thrift -- with-php --with-boost=/usr/local/boost

I meet the same condition; Then seek the detail of config.log trying to fix it

try this:

LDFLAGS='-L/usr/local/ssl/lib' LIBS='-ldl' ./configure --prefix=/usr/local/thrift --with-php --with-boost=/usr/local/boost

谁对谁错谁最难过 2025-01-09 05:34:29

以下适用于 Thrift 0.8.0 版本。

为了在 Windows 7x64、msys + mingw64 上解决这个问题,我通过配置从源代码安装了最新的 openssl对于静态和共享:

./configure mingw64 shared
make
make test
make install

仅安装库的静态版本解决了找不到 libcrypto 的问题。
安装共享版本也修复了 libssl 的问题。

在尝试编译测试时编译 openssl v1.0.1c 时出现进一步错误。
大约 3 个 c 测试文件中只有一个文件名,编译器不知道如何处理。
将同一目录中的 dummytest.c 文件中的代码复制到这些有问题的文件中解决了问题。

请注意,默认情况下 openssl 将安装到 /usr/local/ssl 中,因此在配置 thrift 时,您必须指定 LDFLAGS 和 CPPFLAGS 以指向正确的目录。
从构建目录,使用 mingw64 是:

../thrift-0.8.0/configure CPPFLAGS=-I/usr/local/ssl/include LDFLAGS=-L/usr/local/ssl/lib CXXFLAGS=-DMINGW

The following works on version 0.8.0 of Thrift.

To solve this problem on Windows 7x64, msys + mingw64, I installed the latest openssl from source code by configuring for both static and shared:

./configure mingw64 shared
make
make test
make install

Installing just the static version of the library solved libcrypto not being found.
Installing the shared version as well fixed it for libssl as well.

There were errors further on when compiling openssl v1.0.1c while trying to compile the tests.
About 3 of the c test files just had a file name in them which the compiler didn't know what to do with.
Copying the code from the dummytest.c file from the same directory into those problematic files solved the issues.

Note that by default openssl will install into /usr/local/ssl so you will have to specify the LDFLAGS and CPPFLAGS to point to the correct directories when configuring thrift.
From a build directory, using mingw64 it was:

../thrift-0.8.0/configure CPPFLAGS=-I/usr/local/ssl/include LDFLAGS=-L/usr/local/ssl/lib CXXFLAGS=-DMINGW
夜无邪 2025-01-09 05:34:29

我正在使用 opensuse,安装 openssl-devel 后问题得到解决

I am using opensuse the problem was resolved after I installed openssl-devel

苏佲洛 2025-01-09 05:34:29

在 Centos 6.x 上安装 openssl-devel 应该会有所帮助。

On Centos 6.x installing openssl-devel should help.

烈酒灼喉 2025-01-09 05:34:29

在 Ubuntu 上,thrift 0.9...
库通常位于 /usr/lib/x86_64-linux-gnu

sudo apt-get install libssl-dev
sudo apt-get install libssl1.0-dev

On Ubuntu, thrift 0.9...
libraries typically located in /usr/lib/x86_64-linux-gnu

sudo apt-get install libssl-dev
sudo apt-get install libssl1.0-dev

对于 debian 拉伸:
https://packages.ubuntu.com/

您需要下载这些 ubuntu 专用的 64 位软件包值得信赖的长期支持:
zlib1g_1.2.8.dfsg-1ubuntu1_amd64.deb

zlib1g-dev_1.2.8.dfsg-1ubuntu1_amd64.deb

libssl1.0.0_1.0.2g-1ubuntu4.13_amd64.deb

libssl-dev_1.0.2g-1ubuntu4.13_amd64.deb

使用 sudo dpkg -i example

sudo dpkg -i libssl-dev_1.0.2g-1ubuntu4.13_amd64.deb安装每个软件包

For debian stretch :
https://packages.ubuntu.com/

You will need to download these 64bit package which are dedicated for ubuntu trusty LTS :
zlib1g_1.2.8.dfsg-1ubuntu1_amd64.deb

zlib1g-dev_1.2.8.dfsg-1ubuntu1_amd64.deb

libssl1.0.0_1.0.2g-1ubuntu4.13_amd64.deb

libssl-dev_1.0.2g-1ubuntu4.13_amd64.deb

install each package with sudo dpkg -i example

sudo dpkg -i libssl-dev_1.0.2g-1ubuntu4.13_amd64.deb

胡大本事 2025-01-09 05:34:29

您需要安装libcrypto库。在 openSUSE 13.1 上,相关软件包称为 libopenssl-devel。

You need to install the libcrypto library. On openSUSE 13.1, the relevant package is called libopenssl-devel.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文