rea*_*ive 7 c++ openssl cmake libcrypto
我看到了这个问题“找不到包‘libcrypto’”。我几个月前修复的相同错误是遵循这个解决方案: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!
Run Code Online (Sandbox Code Playgroud)
Bot*_*tje 14
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"
Run Code Online (Sandbox Code Playgroud)
由于您的 CMake 脚本似乎使用了 pkg-config,因此您只需要在运行cmake.