需要配置 Thrift libcrypto
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(11)
在 Ubuntu 上安装 libssl-dev 包应该可以修复它。如果您使用其他发行版,包名称应该相似。
On Ubuntu installing libssl-dev package should fix it. If you use another distro, package name should be similar.
在 debian 8 上,
sudo apt-get install libssl1.0-dev
解决了该问题。On debian 8,
sudo apt-get install libssl1.0-dev
solves the issue.在 Amazon Linux(可能还有 CentOS/Fedora/RHEL)上,您需要安装 openssl-devel
On Amazon Linux (and possibly CentOS/Fedora/RHEL), you will need to install openssl-devel
在 Ubuntu 18.04 上,运行以下命令:
sudo apt install libssl1.0-dev
on Ubuntu 18.04, run this:
sudo apt install libssl1.0-dev
我也满足同样的条件;然后寻找 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
以下适用于 Thrift 0.8.0 版本。
为了在 Windows 7x64、msys + mingw64 上解决这个问题,我通过配置从源代码安装了最新的 openssl对于静态和共享:
仅安装库的静态版本解决了找不到 libcrypto 的问题。
安装共享版本也修复了 libssl 的问题。
在尝试编译测试时编译 openssl v1.0.1c 时出现进一步错误。
大约 3 个 c 测试文件中只有一个文件名,编译器不知道如何处理。
将同一目录中的 dummytest.c 文件中的代码复制到这些有问题的文件中解决了问题。
请注意,默认情况下 openssl 将安装到 /usr/local/ssl 中,因此在配置 thrift 时,您必须指定 LDFLAGS 和 CPPFLAGS 以指向正确的目录。
从构建目录,使用 mingw64 是:
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:
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:
我正在使用 opensuse,安装 openssl-devel 后问题得到解决
I am using opensuse the problem was resolved after I installed openssl-devel
在 Centos 6.x 上安装 openssl-devel 应该会有所帮助。
On Centos 6.x installing openssl-devel should help.
在 Ubuntu 上,thrift 0.9...
库通常位于 /usr/lib/x86_64-linux-gnu
On Ubuntu, thrift 0.9...
libraries typically located in /usr/lib/x86_64-linux-gnu
对于 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
您需要安装
libcrypto
库。在 openSUSE 13.1 上,相关软件包称为 libopenssl-devel。You need to install the
libcrypto
library. On openSUSE 13.1, the relevant package is called libopenssl-devel.