编译nginx时提示undefined reference to 'pcre_free_study' 的问题及解决

 

./configure --add-module=../ngx_devel_kit-0.2.19/ --add-module=../lua-nginx-module-0.9.19/  --with-ld-opt="-L /usr/local/lib"  

 在末尾加上 --with-ld-opt="-L /usr/local/lib", 这个路径是pcre的安装路径。

 

还有另外一种方式,是使用源码,在后面加上:

--with-pcre=../pcre-8.30 --with-pcre-jit 

pcre-8.30为pcre的源码,它与nginx的源码放在同级目录。

posted @ 2015-12-16 19:14  何德海  阅读(2171)  评论(0编辑  收藏  举报