问题:未找到包 'libcrypto'

Issue: No package 'libcrypto' found

我看到了这个问题 "No package 'libcrypto' found"。我几个月前修复的相同错误是遵循此解决方案:https://github.com/scipr-lab/libsnark/issues/99 我今天尝试了这个解决方案,但它不再起作用了。 (我也试过"brew install openssl, brew info openssl")运气不好。 你以前见过这个吗?你能帮忙看看吗?

-- 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!

brew info openssl 表示如下:(对我来说,如果您的版本不同,对您来说可能会有所不同)

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"

由于您的CMake脚本似乎使用了pkg-config,因此您只需执行运行 cmake.

之前的最后一条语句即可

当我 运行 ./install_prereq install-unpackaged 命令时,出现以下错误。

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.

然后我运行下面的命令,问题就解决了;

yum install openssl-devel