18

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!

Aloha
  • 425
  • 1
  • 5
  • 16
  • I got this problem with latest thrift version so far (0.8.0). I installed Thrift0.7.0 successfully. Thanks for your answers! – Aloha Feb 08 '12 at 06:40

11 Answers11

21

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

Wildfire
  • 6,358
  • 2
  • 34
  • 50
16

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

NekoPep
  • 171
  • 1
  • 3
11

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

Andrew
  • 580
  • 5
  • 13
5

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

Joe
  • 81
  • 1
  • 2
2

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

woso
  • 271
  • 4
  • 6
  • Oh god...after spending more than 2-3 days, your answer fixed my problem. Thank you so much!!! – vikram Jan 24 '18 at 18:50
1

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
  • 1
    Thanks for this; it gets me past the OP problem but I do still get the "Error: libssl required" immediately following. I built openssl-1.0.1c from scratch using './Configure mingw64 shared' but that doesn't seem to fix it. I've tried lots of combinations of -I and -L etc but nothing seems to work. Are there other steps I may have missed? – Billy Charlton Nov 13 '12 at 01:28
1

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

Suyog Barve
  • 237
  • 3
  • 10
1

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

Hussnain
  • 186
  • 9
1

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
0

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

Ahmed Ouadi
  • 23
  • 1
  • 6
-2

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

Lars Noschinski
  • 3,667
  • 16
  • 29
Anders Kreinøe
  • 1,025
  • 8
  • 11