W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
本文在 Debian8 中安裝 hyperscan 5.0.0
內(nèi)存至少 2 G,不然編譯慢而且失敗
hyperscan使用C++開發(fā),且需要C99和C++11支持,目前支持的編譯器有
依賴項(xiàng) 版本 說明
-------------------------------------------------
CMake >=2.8.11
Ragel 6.9
Python 2.7
Boost >=1.57 僅需要頭文件,無(wú)需編譯
Pcap >=0.8 Optional: 僅用于示例程序
注1: Ragel 最好用 6.9 版本,7.0 版本可能會(huì)報(bào)錯(cuò)
wget -c http://www.colm.net/files/ragel/ragel-6.9.tar.gz
注2:boost不需要編譯安裝,如果通過系統(tǒng)包管理工具(yum/apt-get)安裝的版本無(wú)法滿足版本需要,只需要解壓源碼包
wget -c https://sourceforge.net/projects/boost/files/boost/1.68.0/boost_1_68_0.tar.gz/download
注3:pcap庫(kù)會(huì)依賴flex和bison
ln -s /soft/boost_1_68_0/boost /soft/hyperscan-5.0.0/include/boost
cd /soft/hyperscan-5.0.0
mkdir build
cd build
cmake ../
cmake --build . (別忘了最后有個(gè)點(diǎn),編譯時(shí)間較長(zhǎng))
make install
安裝過程中,提示如下錯(cuò)誤:
hyperscan-5.0.0/src/nfa/limex_compile.cpp:983:54: error: call of overloaded ‘distance(std::vector<boost::dynamic_bitset<> >::iterator, __gnu_cxx::__normal_iterator<boost::dynamic_bitset<>, std::vector<boost::dynamic_bitset<> > >&)’ is ambiguous
return verify_u32(distance(squash.begin(), it));
^
可在 github 的 issues 中找到解決方案 https://github.com/intel/hyperscan/issues/104
作者給出的解釋和解決方案如下:
只需將這兩行的,distance 改為 std::distance 即可
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: