2016-06-21 65 views
1

我試圖在筆記本電腦上構建hadoop源代碼(Windows 7),Maven構建作業遇到錯誤。的詳細信息如下:CMake在我構建Maven項目時遇到錯誤

 [exec] CMake Error at C:/Program Files/CMake/share/cmake-3.6/Modules/FindPa 
ckageHandleStandardArgs.cmake:148 (message): 
    [exec] Could NOT fi-- Configuring incomplete, errors occurred! 
    [exec] See also "C:/cygwin64/home/jding27/hadoop-2.7.1-src/hadoop-common-pr 
oject/hadoop-cond ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
    [exec] Call Stack (most recent call first): 
    [exec] C:/Program Files/CMake/share/cmake-3.6mmon/target/native/CMakeFile 
s/CMakeOutput.log". 
    [exec] /Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MES 
SAGE) 
    [exec] C:/Program Files/CMake/share/cmake-3.6/Modules/FindZLIB.cmake:124 
(FIND_PACKAGE_HANDLE_STANDARD_ARGS) 
    [exec] CMakeLists.txt:107 (find_package) 
    [exec] 
    [exec] 
[INFO] ------------------------------------------------------------------------ 

我已經配置了Windows系統環境變量如下: ZLIB_INCLUDE_DIR = C:\ zlib128 \包括

ZLIB_LIBRARY = C:\ zlib128 \ lib中\ zdll.lib

回答

1

這些錯誤不是指環境變量,而是指它無法確定的CMake變量。如果你有ZLib不在Program Files你必須告訴CMake在哪裏可以找到ZLIB_ROOT。呼叫

cmake -D ZLIB_ROOT:PATH=C:\zlib128 .... 

參考