C++ CMake找不到libcurl-config.CMake
我正在尝试用cmake编译代码。代码从Windows导入到带有Debian操作系统的Raspberry Pi上。在Windows上编译时,代码工作正常。以下是我尝试编译时出现的错误:C++ CMake找不到libcurl-config.CMake,c++,cmake,libcurl,raspberry-pi,C++,Cmake,Libcurl,Raspberry Pi,我正在尝试用cmake编译代码。代码从Windows导入到带有Debian操作系统的Raspberry Pi上。在Windows上编译时,代码工作正常。以下是我尝试编译时出现的错误: CMake Error at CMakeLists.txt:6 (FIND_PACKAGE): By not providing "Findlibcurl.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package c
CMake Error at CMakeLists.txt:6 (FIND_PACKAGE):
By not providing "Findlibcurl.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "libcurl", but
CMake did not find one.
Could not find a package configuration file provided by "libcurl" with any
of the following names:
libcurlConfig.cmake
libcurl-config.cmake
Add the installation prefix of "libcurl" to CMAKE_PREFIX_PATH or set
"libcurl_DIR" to a directory containing one of the above files. If
"libcurl" provides a separate development package or SDK, be sure it has
been installed.
以下是有关libcurl的已安装软件包列表:
ii libcurl3:armhf 7.26.0-1+whe armhf easy-to-use client-side URL trans
ii libcurl3-gnutl 7.26.0-1+whe armhf easy-to-use client-side URL trans
ii libcurl4-opens 7.26.0-1+whe armhf development files and documentati
这是否意味着软件包安装不正确,或者我的安装错误?我还没有接触arduino,但如果您可以访问arduino的debian,请尝试执行以下操作:
sudo apt-get install libcurl-dev --reinstall
然后:
make clean
make
另外,您可能有libcurl,但CMake也需要它的开发信息。您看不到它,但我已经安装了libcurl4 openssl开发。我发现CMAKE_PREFIX_路径位于/usr/local/include,而libcurl位于/usr/include。如何在cmake编译中包含此路径?尝试添加cmake选项-DCMAKE_PREFIX_path=/usr/include或在shell中执行以下字符串:export-cmake_PREFIX_path=$cmake_PREFIX_path/usr/本地/包括。