REST SDK - 找不到OpenSSL

时间:2015-03-08 16:17:27

标签: cmake onedrive

我正在尝试使用REST SDK制作OneDrive命令行应用。唯一的问题是我无法安装它。

以下是我使用的说明link(适用于Mac)。

我到了cmake安装,然后我收到了一个错误。这是我的终端输出。

Folder=build.release;-time=16:07:22: cmake ../Release -DCMAKE_BUILD_TYPE=Release
-- Boost version: 1.57.0
-- Found the following Boost libraries:
--   random
--   chrono
--   system
--   thread
--   locale
--   regex
--   filesystem
CMake Error at /usr/local/Cellar/cmake/3.1.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR: Found unsuitable version "0.9.8zc", but
  required is at least "1.0.0" (found
  /usr/local/Cellar/openssl/1.0.2/lib/libssl.dylib;/usr/local/Cellar/openssl/1.0.2/lib/libcrypto.dylib)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.1.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:372 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/Cellar/cmake/3.1.3/share/cmake/Modules/FindOpenSSL.cmake:318 (find_package_handle_standard_args)
  CMakeLists.txt:85 (find_package)


-- Configuring incomplete, errors occurred!
See also "/Users/{User}/programing/OneDrive/casablanca-219daed12e45618aeffc94b73b83af55c3dca7aa/build.release/CMakeFiles/CMakeOutput.log".
Folder=build.release;-time=16:07:41: 

我已经像他说的那样通过brew安装了OpenSSL(甚至是brew link --force openssl) 我还选择从here直接下载,因为我无法让git clone工作。

我如何更改路径? OpenSSL安装在/usr/bin/openssl

注意

Folder=build.release;-time=16:07:22:是我自定义的bash提示符,而不是是日志的一部分。

2 个答案:

答案 0 :(得分:0)

找到答案。

要修复它,我只使用了这个命令:cmake ../Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/local/opt/openssl

在这里找到答案:http://www.cmake.org/Bug/bug_relationship_graph.php?bug_id=15075

答案 1 :(得分:0)

最新的稳定版本(3.0.2)有这个错误(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784443)但是如果你尝试更新的不稳定版本(我试过3.2.3)它运行正常!