问题
I was trying to install cmake with the system-curl, with ./bootstrap --system-curl
, as seen here. Doing that, I got:
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
CMake Error at CMakeLists.txt:413 (message):
CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!
Call Stack (most recent call first):
CMakeLists.txt:682 (CMAKE_BUILD_UTILITIES)
-- Configuring incomplete, errors occurred!
See also "/root/temp/cmake-3.14.5/CMakeFiles/CMakeOutput.log".
See also "/root/temp/cmake-3.14.5/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
回答1:
For me running ./bootstrap --no-system-curl
led to errors when running cmake on open-cv, because the https protocol could not be found. So I needed to get ./bootstrap --system-curl
running.
The solution is to install curl dev dependencies. These are needed by cmake, not just curl.
I ran:
sudo apt-get install curl
sudo apt-get install libssl-dev libcurl4-openssl-dev
回答2:
Alternatively, you can also just use cmake-provided curl library by running ./bootstrap --no-system-curl
instead.
回答3:
For the reference, I solved looking at this issue on Github. In particular, I downloaded the curl source code from https://curl.haxx.se/download.html and compiled curl with:
/CurlExtractFolder$ ./configure --with--ssl
/CurlExtractFolder$ make
/CurlExtractFolder$ sudo make install
来源:https://stackoverflow.com/questions/56941778/cmake-use-system-curl-is-on-but-a-curl-is-not-found