Monday, 15 June 2015

Issue compiling nginx with pcre on ubuntu -



Issue compiling nginx with pcre on ubuntu -

i'm having problems building ngnix pcre library on ubuntu 12.04.1 lts. configuring runs ok create command fails. i'm new nginx , linux in general i'm not sure issue is.

installation steps:

./configure --add-module=/home/ubuntu/mod_zip/mod_zip-master --with-http_image_filter_module --without-http_rewrite_module --with-pcre=../pcre-8.32 create make install

error

cd ../pcre-8.32 \ && create libpcre.la make[2]: entering directory `/home/ubuntu/pcre-8.32' cc libpcre_la-pcre_byte_order.lo cc libpcre_la-pcre_compile.lo cc libpcre_la-pcre_config.lo cc libpcre_la-pcre_dfa_exec.lo cc libpcre_la-pcre_exec.lo cc libpcre_la-pcre_fullinfo.lo cc libpcre_la-pcre_get.lo cc libpcre_la-pcre_globals.lo cc libpcre_la-pcre_jit_compile.lo cc libpcre_la-pcre_maketables.lo cc libpcre_la-pcre_newline.lo cc libpcre_la-pcre_ord2utf8.lo cc libpcre_la-pcre_refcount.lo cc libpcre_la-pcre_string_utils.lo cc libpcre_la-pcre_study.lo cc libpcre_la-pcre_tables.lo cc libpcre_la-pcre_ucd.lo cc libpcre_la-pcre_valid_utf8.lo cc libpcre_la-pcre_version.lo cc libpcre_la-pcre_xclass.lo rm -f pcre_chartables.c ln -s ./pcre_chartables.c.dist pcre_chartables.c cc libpcre_la-pcre_chartables.lo ccld libpcre.la make[2]: leaving directory `/home/ubuntu/pcre-8.32' gcc -o objs/nginx \ objs/src/core/nginx.o \ objs/src/core/ngx_log.o \ objs/src/core/ngx_palloc.o \ objs/src/core/ngx_array.o \ ... ... ... objs/addon/mod_zip-master/ngx_http_zip_module.o \ objs/addon/mod_zip-master/ngx_http_zip_parsers.o \ objs/addon/mod_zip-master/ngx_http_zip_file.o \ objs/addon/mod_zip-master/ngx_http_zip_headers.o \ objs/ngx_modules.o \ -lpthread -lcrypt ../pcre-8.32/.libs/libpcre.a -lcrypto -lcrypto -lz -lgd objs/src/core/nginx.o: in function `main': /home/ubuntu/nginx-1.2.6/src/core/nginx.c:275: undefined reference `ngx_regex_init' objs/src/http/ngx_http_core_module.o: in function `ngx_http_gzip_disable': /home/ubuntu/nginx-1.2.6/src/http/ngx_http_core_module.c:4918: undefined reference `ngx_regex_compile' objs/src/http/ngx_http_core_module.o: in function `ngx_http_gzip_ok': /home/ubuntu/nginx-1.2.6/src/http/ngx_http_core_module.c:2218: undefined reference `ngx_regex_exec_array' objs/src/http/ngx_http_variables.o: in function `ngx_http_regex_compile': /home/ubuntu/nginx-1.2.6/src/http/ngx_http_variables.c:2074: undefined reference `ngx_regex_compile' objs/src/http/modules/ngx_http_ssi_filter_module.o: in function `ngx_http_ssi_regex_match': /home/ubuntu/nginx-1.2.6/src/http/modules/ngx_http_ssi_filter_module.c:1882: undefined reference `ngx_regex_compile' objs/src/http/modules/ngx_http_referer_module.o: in function `ngx_http_referer_variable': /home/ubuntu/nginx-1.2.6/src/http/modules/ngx_http_referer_module.c:197: undefined reference `ngx_regex_exec_array' objs/src/http/modules/ngx_http_referer_module.o: in function `ngx_http_add_regex_referer': /home/ubuntu/nginx-1.2.6/src/http/modules/ngx_http_referer_module.c:582: undefined reference `ngx_regex_compile' objs/src/http/modules/ngx_http_fastcgi_module.o: in function `ngx_http_fastcgi_split_path_info': /home/ubuntu/nginx-1.2.6/src/http/modules/ngx_http_fastcgi_module.c:2891: undefined reference `ngx_regex_compile' collect2: ld returned 1 exit status make[1]: *** [objs/nginx] error 1 make[1]: leaving directory `/home/ubuntu/nginx-1.2.6' make: *** [build] error 2

thanks!

you specify not utilize rewrite module, means nginx shouldn't need pcre. specify pcre location.

i think should remove --with-pcre= parameter, should fine. don't need pcre anyway if don't utilize rewrite module.

nginx pcre

No comments:

Post a Comment