安装依赖ragel
编译安装
$ tar -xvf ragel-6.10.tar.gz$ cd ragel-6.10$ ./configure$ make $ sudo make install$ ldconfig
安装依赖boost
,这里下载的是
编译安装,只需要安装iostreams和random就可以了,全部安装会比较慢
$ tar -xvf boost_1_69_0.tar.gz$ cd boost_1_69_0$ ./bootstrap.sh$ sudo ./b2 --with-iostreams --with-random install$ ldconfig
安装hyperscan
在里面选择下载Source code (tar.gz)
编译安装,cmake时指定-DBUILD_SHARED_LIBS=on
编译结果为动态库,不指定默认为静态库
$ tar -xvf hyperscan-5.1.0.tar.gz$ cd hyperscan-5.1.0$ mkdir cmake-build$ cd cmake-build$ cmake -DBUILD_SHARED_LIBS=on -DCMAKE_BUILD_TYPE=Release ..$ make -j8$ sudo make install$ ldconfig
至此完成
root@debian:~# ldconfig -p | grep hs libhs_runtime.so.5 (libc6,x86-64) => /usr/local/lib/libhs_runtime.so.5 libhs_runtime.so.5 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libhs_runtime.so.5 libhs_runtime.so (libc6,x86-64) => /usr/local/lib/libhs_runtime.so libhs.so.5 (libc6,x86-64) => /usr/local/lib/libhs.so.5 libhs.so.5 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libhs.so.5 libhs.so (libc6,x86-64) => /usr/local/lib/libhs.soroot@debian:~#