2012-05-23 27 views
4

我試圖用tar文件whalebot-0.02.00.tar.gz配置whalebot爬網程序。CMake錯誤:下列變量用於此項目,但它們被設置爲NOTFOUND

[email protected]:~/dls# tar xvzf whalebot-0.02.00.tar.gz 

之後,我想與配置它:我與正確提取它

[email protected]:~/dls/whalebot# ./configure 

它給我的錯誤:

bash: ./configure: No such file or directory

也我已經運行命令:

[email protected]:~/dls/whalebot# cmake ./ 

它給了我以下翅膀結果:

[email protected]:~/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! 

我該如何繼續?

回答

3

看來CMake無法找到htmlcxx庫。

whalebot documentation中,htmlcxx被列爲依賴項。


您需要download htmlcxx,解壓縮,然後再進行安裝:

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

您可能需要添加#include <cstddef>html/tree.h頂部得到它成功打造。它將默認安裝到usr/local/


你還需要安裝icu如果你不已經擁有了它:

sudo apt-get install libicu-dev 


最後,您現在就可以編譯和安裝whalebot。同樣,如果你有一個合理的最新升壓安裝,可能會失敗。

webspider/src/webspider_options.cpp的第57行中,您需要將替換爲boost::filesystem::initial_path().string()。那麼你應該很好地構建和安裝:

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

默認情況下,它也會安裝到usr/local/

+0

我如何附加htmlcxx庫,我是Linux新手,所以請不要介意** thnx ** –

+0

@MuhammadAssad - 我更新了答案。 – Fraser

+0

**謝謝** @Fraser –

相關問題