13

I saw this issue "No package 'libcrypto' found". The same error I fixed multiple months ago was to follow this solution: https://github.com/scipr-lab/libsnark/issues/99 I tried this solution today however it doesn't work anymore. (I also tried"brew install openssl, brew info openssl") No luck. Have you seen this before? Would you help take a look?

-- Checking for module 'libcrypto'
--   No package 'libcrypto' found
CMake Error at /usr/local/Cellar/cmake/3.15.4/share/cmake/Modules/FindPkgConfig.cmake:458 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.15.4/share/cmake/Modules/FindPkgConfig.cmake:637 (_pkg_check_modules_internal)
  PlaylistParser/src/CMakeLists.txt:2 (pkg_check_modules)


-- Configuring incomplete, errors occurred!
reactnative
  • 505
  • 2
  • 7
  • 14

2 Answers2

27

brew info openssl says the following: (for me, might be different for you if your version is different)

openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
because openssl/libressl is provided by macOS so don't link an incompatible version.

If you need to have openssl@1.1 first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc

For compilers to find openssl@1.1 you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"

For pkg-config to find openssl@1.1 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"

Since your CMake script seems to use pkg-config, you only need to execute the last statement before you run cmake.

Botje
  • 26,269
  • 3
  • 31
  • 41
1

When I run ./install_prereq install-unpackaged command, I'd got the following error.

configure: error: Package requirements (libcrypto >= 1.0.1) were not met:

No package 'libcrypto' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables crypto_CFLAGS and crypto_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

Then I run the following command and the problem was solved;

yum install openssl-devel
Ibrahim Ates
  • 375
  • 2
  • 5
  • 15