首页 > Linux系统管理 > 安装ngx_openresty 报gmake[2]: *** [objs/nginx] 错误 1
2017
05-18

安装ngx_openresty 报gmake[2]: *** [objs/nginx] 错误 1

安装的时候

 ./configure --prefix=/usr/local/openresty --with-luajit --with-http_iconv_module  --with-http_postgres_module --with-pcre-jit
gmake 报错了
objs/addon/src/ngx_http_lua_regex.o: In function `ngx_http_lua_regex_free_study_data':
/home/ngx_openresty-1.9.7.1/build/nginx-1.9.7/../ngx_lua-0.9.20/src/ngx_http_lua_regex.c:1948: undefined reference to `pcre_free_study'
objs/addon/src/ngx_http_lua_regex.o: In function `ngx_http_lua_ffi_destroy_regex':
/home/ngx_openresty-1.9.7.1/build/nginx-1.9.7/../ngx_lua-0.9.20/src/ngx_http_lua_regex.c:2335: undefined reference to `pcre_free_study'
collect2: ld 返回 1
gmake[2]: *** [objs/nginx] 错误 1
gmake[2]: Leaving directory `/home/ngx_openresty-1.9.7.1/build/nginx-1.9.7'
gmake[1]: *** [build] 错误 2
gmake[1]: Leaving directory `/home/ngx_openresty-1.9.7.1/build/nginx-1.9.7'
gmake: *** [all] 错误 2

需要指定下 pcre

./configure --prefix=/usr/local/openresty --with-luajit --with-http_iconv_module  --with-http_postgres_module --with-pcre-jit --with-pcre=../pcre-8.38 
gmake
gmake install
最后编辑:
作者:saunix
大型互联网公司linux系统运维攻城狮,专门担当消防员