一台测试机安装nginx编译安装时make出错!详细信息如下:
./configure参数
./configure --prefix=/usr/local/nginx --user=www --group=www
make错误
objs/ngx_modules.o \
-lpthread -lcrypt -lpcre -lcrypto -lcrypto -lz
objs/src/core/ngx_regex.o(.text+0x35d): In function `ngx_pcre_free_studies':
src/core/ngx_regex.c:307: undefined reference to `pcre_free_study'
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] 错误 1
make[1]: Leaving directory `/root/nginx-1.3.5'
make: *** [build] 错误 2
经网上查资料说要加--with-pcre=/root/pcre-8.31
/root/pcre-8.31是解压pcre后的目录
./configure --prefix=/usr/local/nginx --user=www --group=www --with-pcre=/root/pcre-8.31
-lpthread -lcrypt /root/pcre-8.31/.libs/libpcre.a -lcrypto -lcrypto -lz
make[1]: Leaving directory `/root/nginx-1.3.5'
make -f objs/Makefile manpage
make[1]: Entering directory `/root/nginx-1.3.5'
sed -e "s|%%PREFIX%%|/usr/local/nginx|" \
-e "s|%%PID_PATH%%|/usr/local/nginx/logs/nginx.pid|" \
-e "s|%%CONF_PATH%%|/usr/local/nginx/conf/nginx.conf|" \
-e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|" \
< man/nginx.8 > objs/nginx.8
make[1]: Leaving directory `/root/nginx-1.3.5'
这样就OK了!!!
阅读(6403) | 评论(0) | 转发(0) |