-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) CMake Error at Utilities/cmcurl/CMakeLists.txt:525 (message): Could not find OpenSSL. Install an OpenSSL development package or configure CMake with -DCMAKE_USE_OPENSSL=OFF to build without OpenSSL.
时间: 2024-01-21 14:38:53 浏览: 895
这个错误是由于 CMake 在编译时无法找到 OpenSSL 库导致的。你需要安装 OpenSSL 的开发包或将 OpenSSL 根文件夹路径设置为系统变量 OPENSSL_ROOT_DIR。如果你不需要使用 OpenSSL,也可以通过在 CMake 中设置 -DCMAKE_USE_OPENSSL=OFF 参数来构建项目,以避免此错误。
相关问题
CMake Error at F:/cmake-3.26.4-windows-x86_64/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR) (Required is at least version "1.1.1")
这是一个 CMake 错误,表示找不到 OpenSSL 库。建议你在系统环境变量中设置 OPENSSL_ROOT_DIR 的路径,确保它指向 OpenSSL 库的根目录,并且版本至少为 1.1.1。这样 CMake 就可以找到 OpenSSL 库并将其链接到你的项目中了。你可以在 CMakeLists.txt 文件中添加以下代码来设置 OPENSSL_ROOT_DIR:
```
set(OPENSSL_ROOT_DIR /path/to/openssl)
```
其中 `/path/to/openssl` 是 OpenSSL 库的根目录的实际路径。
OpenSSL 的安装路径怎么找
在 Windows 系统中,如果你使用的是已经安装好的 OpenSSL,可以按照以下步骤找到 OpenSSL 的安装路径:
1. 打开 "控制面板",选择 "程序",然后选择 "程序和功能"。
2. 在 "程序和功能" 窗口中,找到并点击 "OpenSSL"。
3. 点击 "修改" 按钮,然后在 "OpenSSL Setup" 窗口中,记录下 "Destination Folder" 的路径。这就是 OpenSSL 的安装路径。
如果你没有安装 OpenSSL,可以从 OpenSSL 的官方网站下载并安装它。在安装过程中,可以选择自定义安装路径。
阅读全文
相关推荐
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![CHM](https://img-home.csdnimg.cn/images/20250102104920.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![CHM](https://img-home.csdnimg.cn/images/20250102104920.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![application/octet-stream](https://img-home.csdnimg.cn/images/20210720083646.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)