首页 > 其他 > 详细

编译nginx的时候报错 需要安装PCRE

时间:2019-02-19 19:29:53      阅读:264      评论:0      收藏:0      [点我收藏+]

 ./configure --prefix=/mynginx/

本地编译nginx的时候 报错 提示需要安装PCRE

错误信息:

./configure: error: the HTTP rewrite module requires the PCRE library.

You can either disable the module by using --without-http_rewrite_module

option, or install the PCRE library into the system, or build the PCRE library

statically from the source with nginx by using --with-pcre=<path> option.

 

下载最新版本pcre

地址:http://www.pcre.org

解压到路经

/usr/local/src
我下载安装的是pcre2-10.32.tar
cd pcre2-10.32
./configure --prefix=/usr/local
详细操作流程
cd /usr/local/src tar pcre2-10.32.tar
cd pcre2-10.32
./configure --prefix=/usr/local make sudo make install

安装成功之后

重新回去编译nginx
根据错误信息 需要增加参数 指定PCRE library的路经地址

./configure --prefix=/mynginx/  --with-pcre=/usr/local/

重新编译 成功.

 技术分享图片

编译nginx的时候报错 需要安装PCRE

原文:https://www.cnblogs.com/Jordandan/p/10402912.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!