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!
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!
On Ubuntu installing libssl-dev package should fix it. If you use another distro, package name should be similar.
On Amazon Linux (and possibly CentOS/Fedora/RHEL), you will need to install openssl-devel
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
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
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
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
You need to install the libcrypto
library. On openSUSE 13.1, the relevant package is called libopenssl-devel.