在安装Gamelift过程中,如果您遇到了类似这样的错误:
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_INCLUDE_DIR (ADVANCED)
-- Configuring incomplete, errors occurred!
See also "/path/to/gamelift-server/bla/CMakeFiles/CMakeOutput.log".
则说明在cmake过程中出现了openssl错误。
这种情况下,可以尝试手动指定要使用的openssl版本,从而解决此问题。
例如,您可以在cmake命令中添加以下参数:
-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1
-DOPENSSL_LIBRARIES=/usr/local/opt/openssl@1.1/lib/
其中的 /usr/local/opt/openssl@1.1
是openssl的安装目录,您需要根据您安装的openssl版本来进行相应的修改。
如果您使用的是MacOS,并且使用homebrew安装了openssl,则openssl的安装目录可能如上所示,您可以根据自己的安装情况来进行相应修改。
添加上述参数后,再次执行cmake命令即可解决openssl相关的问题。
上一篇:安装g++-7:未满足的依赖关系