LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-11-2008, 07:24 PM   #1
havok1977
Member
 
Registered: Apr 2005
Distribution: Mint KDE on the Desktop, Debian on the Server
Posts: 66

Rep: Reputation: 15
Problem compiling mod_security on a CentOS server


Hello everyone,

Im trying to harden the security on an internal server and decided to improve the security for the Apache daemon with the mod_security module.

I downloaded the latest version and tried to compile it but got the following error:

Code:
[root@asterisk1 apache2]# apxs -cia modsecurity.c
/bin/sh /usr/lib/apr/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apr-0 -I/usr/include/httpd  -c -o modsecurity.lo modsecurity.c && touch modsecurity.slo
In file included from modsecurity.h:38,
                 from modsecurity.c:23:
msc_pcre.h:24:18: pcre.h: No such file or directory
In file included from modsecurity.h:40,
                 from modsecurity.c:23:
msc_xml.h:25:31: libxml/xmlschemas.h: No such file or directory
msc_xml.h:26:26: libxml/xpath.h: No such file or directory
In file included from modsecurity.h:40,
                 from modsecurity.c:23:
msc_xml.h:31: error: syntax error before "xmlSAXHandler"
msc_xml.h:31: warning: no semicolon at end of struct or union
msc_xml.h:32: warning: data definition has no type or storage class
msc_xml.h:33: error: syntax error before "doc"
msc_xml.h:33: warning: data definition has no type or storage class
msc_xml.h:36: error: syntax error before '}' token
modsecurity.c: In function `is_response_status_relevant':
modsecurity.c:359: error: `PCRE_ERROR_NOMATCH' undeclared (first use in this function)
modsecurity.c:359: error: (Each undeclared identifier is reported only once
modsecurity.c:359: error: for each function it appears in.)
apxs:Error: Command failed with rc=65536
I should point out that all the necessary development packages are installed.

I havent found a proper fix doing some googling, so maybe someone here can help me out?

Thanks in advance...

Last edited by havok1977; 12-11-2008 at 07:48 PM.
 
Old 12-11-2008, 08:02 PM   #2
havok1977
Member
 
Registered: Apr 2005
Distribution: Mint KDE on the Desktop, Debian on the Server
Posts: 66

Original Poster
Rep: Reputation: 15
Fixed it, the problem was that the server is running an outdated version of CentOS; had to download the latest stable release of the 1.X.X brand of mod_security and it worked fine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem compiling ivtv-0.10.6 against 2.6.18-92.1.18.el5.centos.plus treimers Linux - Software 2 12-06-2008 01:44 PM
mod_security compile problem? olddocks Linux - Server 5 05-12-2008 10:16 PM
problem with iptables afer compiling 2.6.24.2 from www.kernel.org on centos 5.1 tanch Linux - Newbie 4 03-03-2008 01:22 AM
Problem with mod_security... Please help! jim.thornton Linux - Security 16 01-25-2008 08:25 AM
mod_security problem bytez Linux - Security 2 10-01-2006 09:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration