CMake找不到libcurl-config.cmake

时间:2013-11-01 02:05:41

标签: c++ cmake libcurl raspberry-pi

我正在尝试使用cmake编译代码。代码从Windows导入到使用Debian OS的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 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

这是否意味着软件包安装不正确或我的错误?

1 个答案:

答案 0 :(得分:0)

我还没有触及arduino,但是如果你能访问arduino的debian - 尝试做类似的事情:

sudo apt-get install libcurl-dev --reinstall

然后:

make clean
make

P.S。你可能有libcurl但是CMake也需要它的开发信息。