Skip to content

./configure: error: ngx_http_modsecurity_module requires the ModSecurity library. #2683

@Peterzhangnoise

Description

@Peterzhangnoise

I checked the history problem and tried to fix it, but it didn't work and also try
export MODSECURITY_LIB="/usr/local/modsecurity/lib/"
export MODSECURITY_INC="/usr/local/modsecurity/include/modsecurity/"
same does not work

Logs and dumps

./configure --prefix=/home/admin/nginx --user=admin --group=admin --with-pcre=../pcre-8.43 --with-pcre-jit --with-file-aio --with-threads --with-http_realip_module --with-http_addition_module --with-http_mp4_module --with-http_secure_link_module --with-http_gunzip_module --with-http_auth_request_module --with-http_degradation_module --with-http_slice_module --with-stream --with-stream_ssl_module --with-stream_realip_module --with-stream_sni --with-stream_ssl_preread_module --with-http_v2_module --with-http_gzip_static_module --with-http_stub_status_module --add-module=../ngx_devel_kit --add-module=../lua-nginx-module --add-module=../echo-nginx-module --add-module=../redis2-nginx-module --add-module=../set-misc-nginx-module --add-module=./modules/ngx_http_concat_module --add-module=./modules/ngx_http_reqstat_module --add-module=./modules/ngx_http_upstream_check_module --add-module=./modules/ngx_http_upstream_consistent_hash_module --add-module=./modules/ngx_http_upstream_dynamic_module --add-module=./modules/ngx_http_upstream_dyups_module --add-module=./modules/ngx_http_upstream_session_sticky_module --add-module=../modsecurity-nginx-v1.0.2 --with-zlib=../zlib-1.2.8 --with-openssl=../openssl-OpenSSL_1_1_1e --with-http_sub_module
checking for OS

  • Linux 2.6.32-754.el6.x86_64 x86_64
    checking for C compiler ... found
  • using GNU C compiler
  • gcc version: 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)
    checking for gcc -pipe switch ... found
    checking for -Wl,-E switch ... found
    checking for gcc builtin atomic operations ... found
    checking for C99 variadic macros ... found
    checking for gcc variadic macros ... found
    checking for gcc builtin 64 bit byteswap ... found
    checking for unistd.h ... found
    checking for inttypes.h ... found
    checking for limits.h ... found
    checking for sys/filio.h ... not found
    checking for sys/param.h ... found
    checking for sys/mount.h ... found
    checking for sys/statvfs.h ... found
    checking for crypt.h ... found
    checking for Linux specific features
    checking for epoll ... found
    checking for EPOLLRDHUP ... found
    checking for EPOLLEXCLUSIVE ... not found
    checking for O_PATH ... not found
    checking for sendfile() ... found
    checking for sendfile64() ... found
    checking for sys/prctl.h ... found
    checking for prctl(PR_SET_DUMPABLE) ... found
    checking for prctl(PR_SET_KEEPCAPS) ... found
    checking for capabilities ... found
    checking for crypt_r() ... found
    checking for sys/vfs.h ... found
    checking for poll() ... found
    checking for /dev/poll ... not found
    checking for kqueue ... not found
    checking for crypt() ... not found
    checking for crypt() in libcrypt ... found
    checking for F_READAHEAD ... not found
    checking for posix_fadvise() ... found
    checking for O_DIRECT ... found
    checking for F_NOCACHE ... not found
    checking for directio() ... not found
    checking for statfs() ... found
    checking for statvfs() ... found
    checking for dlopen() ... not found
    checking for dlopen() in libdl ... found
    checking for sched_yield() ... found
    checking for sched_setaffinity() ... found
    checking for SO_SETFIB ... not found
    checking for SO_REUSEPORT ... found
    checking for SO_ACCEPTFILTER ... not found
    checking for SO_BINDANY ... not found
    checking for IP_TRANSPARENT ... found
    checking for IP_BINDANY ... not found
    checking for IP_BIND_ADDRESS_NO_PORT ... not found
    checking for IP_RECVDSTADDR ... not found
    checking for IP_SENDSRCADDR ... not found
    checking for IP_PKTINFO ... found
    checking for IPV6_RECVPKTINFO ... found
    checking for TCP_DEFER_ACCEPT ... found
    checking for TCP_KEEPIDLE ... found
    checking for TCP_FASTOPEN ... not found
    checking for TCP_INFO ... found
    checking for accept4() ... found
    checking for kqueue AIO support ... not found
    checking for Linux AIO support ... found
    checking for int size ... 4 bytes
    checking for long size ... 8 bytes
    checking for long long size ... 8 bytes
    checking for void * size ... 8 bytes
    checking for uint32_t ... found
    checking for uint64_t ... found
    checking for sig_atomic_t ... found
    checking for sig_atomic_t size ... 4 bytes
    checking for socklen_t ... found
    checking for in_addr_t ... found
    checking for in_port_t ... found
    checking for rlim_t ... found
    checking for uintptr_t ... uintptr_t found
    checking for system byte ordering ... little endian
    checking for size_t size ... 8 bytes
    checking for off_t size ... 8 bytes
    checking for time_t size ... 8 bytes
    checking for AF_INET6 ... found
    checking for setproctitle() ... not found
    checking for pread() ... found
    checking for pwrite() ... found
    checking for pwritev() ... found
    checking for sys_nerr ... found
    checking for localtime_r() ... found
    checking for clock_gettime(CLOCK_MONOTONIC) ... not found
    checking for clock_gettime(CLOCK_MONOTONIC) in librt ... found
    checking for posix_memalign() ... found
    checking for memalign() ... found
    checking for mmap(MAP_ANON|MAP_SHARED) ... found
    checking for mmap("/dev/zero", MAP_SHARED) ... found
    checking for System V shared memory ... found
    checking for POSIX semaphores ... not found
    checking for POSIX semaphores in libpthread ... found
    checking for struct msghdr.msg_control ... found
    checking for ioctl(FIONBIO) ... found
    checking for struct tm.tm_gmtoff ... found
    checking for struct dirent.d_namlen ... not found
    checking for struct dirent.d_type ... found
    checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
    checking for sysconf(_SC_LEVEL1_DCACHE_LINESIZE) ... found
    checking for openat(), fstatat() ... found
    checking for getaddrinfo() ... found
    checking for sysinfo() ... found
    checking for getloadavg() ... found
    checking for /proc/meminfo ... found
    checking for /proc/stat ... found
    configuring additional modules
    adding module in ../ngx_devel_kit
  • ngx_devel_kit was configured
    adding module in ../lua-nginx-module
    checking for LuaJIT library in /home/admin/libs/lib and /home/admin/libs/include/luajit-2.1 (specified by the LUAJIT_LIB and LUAJIT_INC env, with -ldl) ... found
    checking for export symbols by default (-E) ... found
    checking for export symbols by default (--export-all-symbols) ... not found
    checking for SO_PASSCRED ... found
    checking for SA_RESTART ... found
    checking for attribute(constructor) ... found
    checking for malloc_trim ... found
    checking for pipe2 ... found
    checking for signalfd ... found
  • ngx_http_lua_module was configured
    adding module in ../echo-nginx-module
  • ngx_http_echo_module was configured
    adding module in ../redis2-nginx-module
  • ngx_http_redis2_module was configured
    adding module in ../set-misc-nginx-module
    found ngx_devel_kit for ngx_set_misc; looks good.
  • ngx_http_set_misc_module was configured
    adding module in ./modules/ngx_http_concat_module
  • ngx_http_concat_module was configured
    adding module in ./modules/ngx_http_reqstat_module
  • ngx_http_reqstat_module was configured
    adding module in ./modules/ngx_http_upstream_check_module
    checking for ngx_http_upstream_check_module ... found
    checking for compiler structure-packing pragma ... found
  • ngx_http_upstream_check_module was configured
    adding module in ./modules/ngx_http_upstream_consistent_hash_module
  • ngx_http_upstream_check_module was configured
    adding module in ./modules/ngx_http_upstream_dynamic_module
  • ngx_http_upstream_dynamic_module was configured
    adding module in ./modules/ngx_http_upstream_dyups_module
  • dyups module support lua
  • ngx_http_dyups_module was configured
    adding module in ./modules/ngx_http_upstream_session_sticky_module
  • ngx_http_dyups_module was configured
    adding module in ../modsecurity-nginx-v1.0.2
    checking for ModSecurity library ... not found
    checking for ModSecurity library in /usr/local/modsecurity ... not found
    ./configure: error: ngx_http_modsecurity_module requires the ModSecurity library.

Server (please complete the following information):

  • ModSecurity version (and connector): ModSecurity v3.0.6 with nginx-connector v1.0.2
  • WebServer: tengine-2.3.2
  • OS (and distro): centos6

[root@localhost tengine-2.3.2]# ll /usr/local/modsecurity/include/modsecurity/
总用量 168
drwxr-xr-x 2 root root 4096 2月 16 21:43 actions
-rw-r--r-- 1 root root 2881 2月 16 21:43 anchored_set_variable.h
-rw-r--r-- 1 root root 3665 2月 16 21:43 anchored_set_variable_translation_proxy.h
-rw-r--r-- 1 root root 2095 2月 16 21:43 anchored_variable.h
-rw-r--r-- 1 root root 5552 2月 16 21:43 audit_log.h
drwxr-xr-x 2 root root 4096 2月 16 21:43 collection
-rw-r--r-- 1 root root 1572 2月 16 21:43 debug_log.h
-rw-r--r-- 1 root root 1656 2月 16 21:43 intervention.h
-rw-r--r-- 1 root root 8563 2月 16 21:43 modsecurity.h
-rw-r--r-- 1 root root 6793 2月 16 21:43 reading_logs_via_rule_message.h
-rw-r--r-- 1 root root 3125 2月 16 21:43 rule.h
-rw-r--r-- 1 root root 2239 2月 16 21:43 rule_marker.h
-rw-r--r-- 1 root root 6634 2月 16 21:43 rule_message.h
-rw-r--r-- 1 root root 2934 2月 16 21:43 rules_exceptions.h
-rw-r--r-- 1 root root 2861 2月 16 21:43 rules.h
-rw-r--r-- 1 root root 13403 2月 16 21:33 rules_properties.h
-rw-r--r-- 1 root root 2648 2月 16 21:43 rules_set.h
-rw-r--r-- 1 root root 1378 2月 16 21:43 rules_set_phases.h
-rw-r--r-- 1 root root 14418 2月 16 21:43 rules_set_properties.h
-rw-r--r-- 1 root root 1797 2月 16 21:43 rule_unconditional.h
-rw-r--r-- 1 root root 5934 2月 16 21:43 rule_with_actions.h
-rw-r--r-- 1 root root 2310 2月 16 21:43 rule_with_operator.h
-rw-r--r-- 1 root root 23324 2月 16 21:43 transaction.h
-rw-r--r-- 1 root root 1227 2月 16 21:43 variable_origin.h
-rw-r--r-- 1 root root 2848 2月 16 21:43 variable_value.h

[root@localhost tengine-2.3.2]# ll /usr/local/modsecurity/lib/
总用量 243508
-rw-r--r-- 1 root root 170386860 2月 16 21:43 libmodsecurity.a
-rwxr-xr-x 1 root root 1124 2月 16 21:43 libmodsecurity.la
lrwxrwxrwx 1 root root 23 2月 16 21:43 libmodsecurity.so -> libmodsecurity.so.3.0.6
lrwxrwxrwx 1 root root 23 2月 16 21:43 libmodsecurity.so.3 -> libmodsecurity.so.3.0.6
-rwxr-xr-x 1 root root 31085695 2月 16 21:33 libmodsecurity.so.3.0.0
-rwxr-xr-x 1 root root 47862984 2月 16 21:43 libmodsecurity.so.3.0.6
drwxr-xr-x 2 root root 4096 2月 16 21:43 pkgconfig

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions