Closed JoyChou93 closed 7 years ago
Hi,
First of all, @p0pr0ck5 , thank you for the work providing this lua resty waf. Also, I am by no mean and expert but on a learning curve instead trying to set up this WAF for tests.
Having said that, on Debian Jessie, "apt-get install libpcre3-dev" did solve this problem for me.
Hope this helps.
FWIW, I first tried to make this install on Centos 7 (using openresty Yum Centos repository) and experienced the same issue. Haven't tried yet to test again on Centos.
Hi,
Sorry for the delayed response. @JoyChou93 make you sure install the dependencies needed for lua-resty-waf, which should automatically occur when running make install
. What I've found is that older versions of Luarocks are not properly installing lrexlib-pcre, so you may need to install this manually (like we do in the Travis config: https://github.com/p0pr0ck5/lua-resty-waf/blob/master/.travis.yml#L33). Note that the luarocks package is not the same thing and compiling OpenResty with --with-pcre
; the former is a Lua binding to the system PCRE lib, the other statically compiles PCRE into the nginx binary.
@yvesb thanks for chiming in :)
Hi,
I am getting this error in Centos 7. I have already installed all necessary packages related to openresty. I have installed pcre, pcre-devel and pcre-static but still I am getting above error. Any idea?
I did an strace nginx -t
to find out that my default installation of OpenResty using official RPM packages on CentOS 7 couldn't find rex_pcre.so
. Solved it by adding a soft link, not sure if it is the best solution, but hopefully this will help someone else out there having the same problem :)
yum install gcc gcc-c++ lua-devel openresty-opm luarocks
luarocks install lrexlib-pcre 2.7.2-1
ln -s /usr/lib64/lua/5.1/rex_pcre.so /usr/local/openresty/luajit/lib/lua/5.1/rex_pcre.so
luarocks install lua-resty-waf
When I install openresty, I use
--with-pcre=/usr/local/src/pcre-8.39
. But now, the error isrex_pcre' not found:
detail: