CORE_LIBS="$CORE_LIBS \
-lapr-1 \
-L/usr/lib64 -laprutil-1 \
-I/usr/local/apache/include \
\
-L/opt/xml2/lib -lxml2 -lz -lm -ldl \
-llua \ <<<<<<<<<<<<<<<<<<<<------------------------- I've deleted this
-lpcre \
-L/usr/local/apache/lib -lm \
\
"
================================
After:
==================================
CORE_LIBS="$CORE_LIBS \
-lapr-1 \
-L/usr/lib64 -laprutil-1 \
-I/usr/local/apache/include \
\
-L/opt/xml2/lib -lxml2 -lz -lm -ldl \
-lpcre \
-L/usr/local/apache/lib -lm \
\
"
===================================
And i tried to re-compile openresty with mod_security, but I got a new error message like this:
=================
/usr/local/src/modsecurity-2.8.0/nginx/modsecurity/../../standalone/.libs/standalone.a(standalone_la-msc_crypt.o): In function `inject_hashed_response_body':
/usr/local/src/modsecurity-2.8.0/standalone/../apache2/msc_crypt.c:1079: undefined reference to `xmlOutputBufferGetSize'
/usr/local/src/modsecurity-2.8.0/standalone/../apache2/msc_crypt.c:1110: undefined reference to `xmlOutputBufferGetSize'
/usr/local/src/modsecurity-2.8.0/standalone/../apache2/msc_crypt.c:1122: undefined reference to `xmlOutputBufferGetSize'
/usr/local/src/modsecurity-2.8.0/standalone/../apache2/msc_crypt.c:1132: undefined reference to `xmlOutputBufferGetContent'
/usr/local/src/modsecurity-2.8.0/standalone/../apache2/msc_crypt.c:1081: undefined reference to `xmlOutputBufferGetSize'
/usr/local/src/modsecurity-2.8.0/standalone/../apache2/msc_crypt.c:1093: undefined reference to `xmlOutputBufferGetSize'
/usr/local/src/modsecurity-2.8.0/standalone/../apache2/msc_crypt.c:1103: undefined reference to `xmlOutputBufferGetContent'
/usr/local/src/modsecurity-2.8.0/standalone/../apache2/msc_crypt.c:1106: undefined reference to `xmlOutputBufferGetSize'
/usr/local/src/modsecurity-2.8.0/standalone/../apache2/msc_crypt.c:1135: undefined reference to `xmlOutputBufferGetSize'
collect2: ld returned 1 exit status
gmake[2]: *** [objs/nginx] Error 1
gmake[2]: Leaving directory `/usr/local/src/ngx_openresty-1.7.7.2/build/nginx-1.7.7'
gmake[1]: *** [build] Error 2
gmake[1]: Leaving directory `/usr/local/src/ngx_openresty-1.7.7.2/build/nginx-1.7.7'
gmake: *** [all] Error 2
=================================
I hope you can give me an enlightenment.
Thank you very much.
On Monday, February 23, 2015 at 1:18:08 AM UTC+7, agentzh wrote:
Hello!
On Sat, Feb 21, 2015 at 10:13 PM, Vizualt wrote:
> Please help, i have error like this when compiling lua with mod_security:
>
> /usr/bin/ld: cannot find -llua
> collect2: ld returned 1 exit status
Seems like the modsecurity module for nginx tries to link against the
standard Lua interpreter while OpenResty/ngx_lua tries to link against
its bundled version of LuaJIT by default. They won't work together.
A simple workaround is to remove the "-llua" or "-llua5.1" linker
option from modsecurity's "config" file in its source tree (should be
the file nginx/modsecurity/config or something like that). You can try
that on your side.
Regards,
-agentzh