使用 OpenSSL 编译时缺少 CMake 变量

use*_*268 1 linux compilation cmake

我正在尝试使用 CMake 在 Debian 上编译 servermod。每个必需的软件包似乎都已安装。如果我开始编译,我会收到此错误:

    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
    Please set them or make sure they are set and tested correctly in the CMake files:
    OPENSSL_CRYPTO_LIBRARIES (ADVANCED)

    OPENSSL_INCLUDE_DIR (ADVANCED)

    OPENSSL_SSL_LIBRARIES (ADVANCED)
Run Code Online (Sandbox Code Playgroud)

我完全不知道如何修复它。必须在哪里设置?

小智 5

你可能需要安装openssl的开发包。

apt install libssl-dev
Run Code Online (Sandbox Code Playgroud)

我有同样的问题,这为我解决了。