CMake错误:以下变量在此项目中使用,但它们设置为NOTFOUND [英] CMake Error: The following variables are used in this project, but they are set to NOTFOUND

查看:27624
本文介绍了CMake错误:以下变量在此项目中使用,但它们设置为NOTFOUND的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用tar文件配置 whalebot 爬网程序 whalebot-0.02.00.tar.gz 。我已正确提取它:

I am trying to configure the whalebot crawler with the tar file whalebot-0.02.00.tar.gz. I have extracted it correctly with:

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

之后,我要使用以下配置:

After that I want to configure it with:

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


$ b b

它给我错误:

It gives me error:


bash:./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_time
CMake Warning (dev) at webspider/CMakeLists.txt:25 (link_directories):
This command specifies the relative path

../statsem_string/bin

as a link directory.

Policy CMP0015 is not set: link_directories() treats paths relative to the
source dir. Run "cmake --help-policy CMP0015" for policy details. Use the
cmake_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-url

as a link directory.

Policy CMP0015 is not set: link_directories() treats paths relative to the
source dir. Run "cmake --help-policy CMP0015" for policy details. Use the
cmake_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_LIBRARY
linked by target "whalebot" in directory /root/dls/whalebot/webspider

-- Configuring incomplete, errors occurred!

如何处理?

推荐答案

看起来CMake找不到htmlcxx库。

It appears that CMake is unable to find the htmlcxx library.

whalebot文档,htmlcxx被列为依赖项。

In the whalebot documentation, htmlcxx is listed as a dependency.



您需要下载htmlcxx ,将其解压缩,然后安装:


You need to download htmlcxx, unzip it, then install it:

cd <path to unzipped htmlcxx>
./configure --enable-static=on --enable-shared=off
make
sudo make install

您可能需要在 html / tree的顶部添加 #include< cstddef> h 以使其成功构建。默认情况下会安装到 usr / local /

如果您还没有安装 icu

sudo apt-get install libicu-dev


最后,您现在可以构建和安装whalebot。

Finally, you can now build and install whalebot. Again, making might fail if you have a reasonably up-to-date boost installation.

的第57行中,webspider / src / webspider_options.cpp ,你需要用替换 boost :: filesystem :: initial_path()。native_directory_string() :initial_path()。string()。那么你应该很好的构建和安装:

In line 57 of webspider/src/webspider_options.cpp, you need to replace boost::filesystem::initial_path().native_directory_string() with boost::filesystem::initial_path().string(). Then you should be good to build and install:

cd <path to unzipped whalebot>
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
sudo make install

默认情况下也会安装到 usr / local /

This too will install to usr/local/ by default.

这篇关于CMake错误:以下变量在此项目中使用,但它们设置为NOTFOUND的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆