Error showed: "Can't find OpenSSL headers" while configuring SoftHSMv2 with for Hyperledger Fabric environment on macOS

354 views Asked by At

I'm trying to create development environment for Hyperledger fabric v2.5 on my macOSX. While installing necessary tools and dependencies, I had to come after SoftHSM.

As per the SoftHSM documentation, I've already installed (with homebrew):

  • openssl : on path: /usr/bin/openssl
  • botan
  • automake,
  • pkg-config,
  • sqlite,
  • cppunit,
  • libtool

I also have git, curl, docker, docker-compose, jq installed on the machine (macOS Ventura 13.2.1).

however, While running the script to configure SoftHSM,

./configure

the script is interrupted, and it shows these at the end,

checking for crypto backend... OpenSSL
checking what are the OpenSSL includes... -I/usr/bin/sqlite3/include
checking what are the OpenSSL libs... -L/usr/bin/sqlite3/lib -lcrypto
checking for openssl/ssl.h... no
configure: error: Can't find OpenSSL headers

Commands like these are also not working:

make
make check
make -C src/lib/test check

How to solve this error configure: error: Can't find OpenSSL headers, can anyone help me out?

I'm expecting to establish a successful development environment for Hyperledger fabric development with SoftHSM v2.5.

2

There are 2 answers

1
bestbeforetoday On

You probably only need SoftHSM if you are working with HSM / PKCS#11 integration. If not, you can likely do without SoftHSM.

If you do need (or want) SoftHSM, the instructions you are following are to compile your SoftHSM installation from source. This should not be necessary. Just installing using Homebrew with brew install softhsm should be sufficient.

0
Max Chee On

You should take a look at where your openssl is configured (which openssl). If the path only contains the bin which you probably installed through brew, then it doesn't come with openssl headers. You will need to clone and build the openssl from scratch so that it has the openssl headers.