-
Jul14
Nginx与PCRE
Posted in Web服务器, 操作系统, 系统管理, 1,111 views
-
Nginx的Urlrewrite模块依赖PCRE,而Nginx不能很好的识别到系统中的PCRE,在make时可能遇到类似这样的错误:
make -f objs/Makefile
make[1]: Entering directory `/root/nginx-0.7.65'
cd /usr/local/lib/pcre \
&& if [ -f Makefile ]; then make distclean; fi \
&& CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
./configure --disable-shared
/bin/sh: line 0: cd: /usr/local/lib/pcre: No such file or directory
make[1]: *** [/usr/local/lib/pcre/Makefile] Error 1
make[1]: Leaving directory `/root/nginx-0.7.65'
make: *** [build] Error 2原因是nginx不能自动找到pcre的库文件,下载最新的pcre源码包安装后:
#mkdir -p /usr/local/lib/.libs/
# cp /usr/local/lib/libpcre.a /usr/local/lib/.libs/libpcre.aRelated posts:

Leave a comment | Trackback 这篇文章还没有评论.