linux – CMake错误:此项目中使用了以下变量,但它们设置为NOTFOUND

linux – CMake错误:此项目中使用了以下变量,但它们设置为NOTFOUND,第1张

概述我正在尝试使用tar文件whalebot-0.02.00.tar.gz配置whalebot爬虫.我已正确提取它: root@Admin1:~/dls# tar xvzf whalebot-0.02.00.tar.gz 之后我想配置它: root@Admin1:~/dls/whalebot# ./configure 它给了我错误: bash: ./configure: No such file or 我正在尝试使用tar文件whalebot-0.02.00.tar.gz配置whalebot爬虫.我已正确提取它:

root@admin1:~/dls# tar xvzf whalebot-0.02.00.tar.gz

之后我想配置它:

root@admin1:~/dls/whalebot# ./configure

它给了我错误:

bash: ./configure: No such file or directory

我也运行了命令:

root@admin1:~/dls/whalebot# cmake ./

它给了我以下结果:

root@admin1:~/dls/whalebot# cmake ./-- The C compiler IDentification is GNU-- The CXX compiler IDentification is GNU-- Check for working C compiler: /usr/bin/gcc-- Check for working C compiler: /usr/bin/gcc -- works-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Check for working CXX compiler: /usr/bin/c++-- Check for working CXX compiler: /usr/bin/c++ -- works-- Detecting CXX compiler ABI info-- Detecting CXX compiler ABI info - done-- Boost version: 1.44.0-- Found the following Boost librarIEs:-- filesystem-- system-- thread-- program_options-- date_timeCMake Warning (dev) at webspIDer/CMakeLists.txt:25 (link_directorIEs):This command specifIEs the relative path../statsem_string/binas a link directory.Policy CMP0015 is not set: link_directorIEs() treats paths relative to thesource dir. Run "cmake --help-policy CMP0015" for policy details. Use thecmake_policy command to set the policy and suppress this warning.This warning is for project developers. Use -Wno-dev to suppress it.CMake Warning (dev) at webspIDer/CMakeLists.txt:25 (link_directorIEs):This command specifIEs the relative path../3dparty/Google-urlas a link directory.Policy CMP0015 is not set: link_directorIEs() treats paths relative to thesource dir. Run "cmake --help-policy CMP0015" for policy details. Use thecmake_policy command to set the policy and suppress this warning.This warning is for project developers. Use -Wno-dev to suppress it.CMake Error: The following variables are used in this project,but they are set to NOTFOUND.Please set them or make sure they are set and tested correctly in the CMake files:HTMLCXX_liBRARYlinked by target "whalebot" in directory /root/dls/whalebot/webspIDer-- Configuring incomplete,errors occurred!

我该怎么办?

解决方法 看来CMake无法找到HTMLcxx库.

在whalebot documentation中,HTMLcxx被列为依赖项.

你需要download htmlcxx,解压缩,然后安装它:

cd <path to unzipped HTMLcxx>./configure --enable-static=on --enable-shared=offmakesudo make install

您可能需要添加#include< cstddef>到HTML / tree.h的顶部,让它成功构建.它将默认安装到usr / local /.

如果您还没有安装icu,还需要安装icu:

sudo apt-get install libicu-dev

最后,您现在可以构建和安装whalebot.同样,如果您有合理的最新boost安装,则可能会失败.

在webspIDer / src / webspIDer_options.cpp的第57行中,您需要使用boost :: filesystem :: initial_path().string()替换boost :: filesystem :: initial_path().native_directory_string().然后你应该很好地构建和安装:

cd <path to unzipped whalebot>mkdir buildcd buildcmake .. -DCMAKE_BUILD_TYPE=Releasemakesudo make install

这也将默认安装到usr / local /.

总结

以上是内存溢出为你收集整理的linux – CMake错误:此项目中使用了以下变量,但它们设置为NOTFOUND全部内容,希望文章能够帮你解决linux – CMake错误:此项目中使用了以下变量,但它们设置为NOTFOUND所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1018493.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存