apache 安全模塊mod_security 安裝問題

火星人 @ 2014-03-04 , reply:0


apache 安全模塊mod_security 安裝問題

我今天安裝了Apache的安全模塊mod_security  在配置的時候出現了錯誤,還請各位兄台賜教:
以下是錯誤:
root@SpbWebServer apache2]# ./configure --prefix=/opt/modsecurity --with-apxs=/opt/apacheTest/bin/apxs --with-apr=/opt/apacheTest/bin/apr-1-config
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking for perl... /usr/bin/perl
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for C/C++ restrict keyword... __restrict
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for uint8_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking for atexit... yes
checking for fchmod... yes
checking for getcwd... yes
checking for memset... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
configure: looking for Apache module support via DSO through APXS
configure: found apxs at /opt/apacheTest/bin/apxs
configure: checking httpd version
configure: httpd is recent enough
checking for libpcre config script... no
configure: *** pcre library not found.
configure: error: pcre library is required

請問各位兄台如何解決?
《解決方案》

checking for libpcre config script... no
configure: *** pcre library not found.
configure: error: pcre library is required
安裝PCRE先
《解決方案》

源碼包安裝方式的apache,在解壓之後,進入解壓目錄,生成了srclib/pcre/目錄,目錄pcre下有需要編譯的(make)的文件,像樓主所言的報錯,是因為目錄pcre下無任何文件,是故無法繼續下去。原因有可能是下載的時候部分文件受損所致
解決方法:
1:到apache官方網站下載apache源碼包(本人類似經歷,重新下載就可以編譯了)  www.apache.org
2:chenyx 所說的安裝pcre包(我沒有試過,~~呵呵)
《解決方案》

原帖由 chenyx 於 2009-7-30 08:09 發表 http://linux.chinaunix.net/bbs/images/common/back.gif

安裝PCRE先
支持法師!




[火星人 via ] apache 安全模塊mod_security 安裝問題已經有147次圍觀

http://www.coctec.com/docs/service/show-post-21259.html