The error message you received indicates that CMake could not find the OpenSSL library and include directories. To resolve this issue, you can try setting the path to the OpenSSL root folder in the system variable OPENSSL_ROOT_DIR.
Here’s how you can do it:
- Locate the OpenSSL installation folder on your system.
- Set the
OPENSSL_ROOT_DIRenvironment variable to the path of the OpenSSL root folder.
If you’re using Windows:
- Open Control Panel -> System -> Advanced system settings.
- Click on “Environment Variables”.
- Under “System variables”, click “New” and add a variable named
OPENSSL_ROOT_DIRwith the value set to your OpenSSL installation path.
If you’re using Linux or macOS:
- Open a terminal window.
- Run the following command to export the
OPENSSL_ROOT_DIRvariable:
Replaceexport OPENSSL_ROOT_DIR=/path/to/openssl/path/to/opensslwith your actual OpenSSL installation path.
After setting the OPENSSL_ROOT_DIR, try running CMake again and see if it can find OpenSSL successfully.
内容由零声教学AI助手提供,问题来源于学员提问




