linux安装cmake并连接system-curl

wget https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz
tar xvf cmake-3.13.2.tar.gz
cd cmake-3.13.2
./bootstrap --system-curl
make
sudo make install

出现如下错误

-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
CMake Error at CMakeLists.txt:404 (message):
  CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!
Call Stack (most recent call first):
  CMakeLists.txt:685 (CMAKE_BUILD_UTILITIES)


-- Configuring incomplete, errors occurred!
See also "/home/shaorenjie/cmake-3.13.2/CMakeFiles/CMakeOutput.log".
See also "/home/shaorenjie/cmake-3.13.2/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
---------------------------------------------

解决方法:

sudo apt-get install curl
sudo apt-get install libssl-dev libcurl4-openssl-dev

参考:https://stackoverflow.com/questions/56941778/cmake-use-system-curl-is-on-but-a-curl-is-not-found

Logo

更多推荐