【问题标题】:Could NOT find OpenSSL, try to set the path to OpenSSL root folder找不到 OpenSSL,尝试设置 OpenSSL 根文件夹的路径
【发布时间】:2020-03-13 18:02:44
【问题描述】:

我提取了 Cmake zip 文件(从 gi​​thub 下载)并尝试安装它,但出现错误。 我尝试安装 OpenSSL 并尝试安装 Cmake 但仍然出现错误(相同)

终端输出如下:

CMake 3.16.20191118, Copyright 2000-2019 Kitware, Inc. and Contributors
Found GNU toolchain
C compiler on this system is: gcc   
C++ compiler on this system is: g++    
Makefile processor on this system is: make
g++ has setenv
g++ has unsetenv
g++ does not have environ in stdlib.h
g++ has stl wstring
g++ has <ext/stdio_filebuf.h>
---------------------------------------------
make: 'cmake' is up to date.
loading initial cache file /root/Cmake/Bootstrap.cmk/InitialCacheFlags.cmake
-- 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)
-- Configuring incomplete, errors occurred!
See also "/root/Cmake/CMakeFiles/CMakeOutput.log".
See also "/root/Cmake/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
---------------------------------------------

【问题讨论】:

标签: github cmake openssl


【解决方案1】:

我今天在 Ubuntu 18.04 下编译 cmake 3.16-rc4 时遇到了同样的问题。在尝试通过设置适当的路径并首先寻找它们来解决这个问题时,我发现了这一点:How do I install the OpenSSL libraries on Ubuntu?

所以解决方法就是:

sudo apt install libssl-dev

所以cmake显然需要openssl的dev包。感谢Niki Yoshiuchi,他在链接的问题中给出了想要的答案。

【讨论】:

  • 很好的答案,对我帮助很大!谢谢!
猜你喜欢
  • 2019-07-18
  • 2020-10-04
  • 2022-11-11
  • 2013-01-22
  • 2018-01-23
  • 1970-01-01
  • 2011-01-24
  • 2019-08-23
  • 2016-10-02
相关资源
最近更新 更多