English 中文(简体)
CMake 错误: 此工程使用以下变量, 但设定为 NNOFOUND
原标题:CMake Error: The following variables are used in this project, but they are set to NOTFOUND

我正试图用 tar 文件 < code> whallebot 配置 < code > whallebot 爬行器, 配置 tar.gz 。 我用 :

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

之后我要将其配置为 :

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

这让我出错:

bash:./ configure: 没有此文件或目录

我也负责指挥:

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 图书馆。

http://code.google.com/p/whalebot/wiki/Getting Started的 rel=“noreferr'>whalebot文档,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. h 才能成功构建它。 它默认情况下会安装到 usr/local/


You also need icu installed if you don t already have it:

sudo apt-get install libicu-dev


最后,你现在可以建造和安装鲸鱼机器人了。再次,如果你有一个合理的最新助推装置, 这样做可能会失败。

webspider/src/webspider_options.cpp 第57行中,您需要用 webspider/src/webspider_options.cpp 替换 boost:: file system::: first_path (.native_portory_string)() 。 那么您应该善于构建和安装 :

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

这将默认安装到 usr/local/

问题回答

在 CMakeLists 中检查您是否写了 find_library (.) find_path (.) , 然后替换为 find_package (.)

它解决了我案件中的错误





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...