树莓派安装pcre pcre-devel

最近在树莓派上编译nginx出现如下错误

./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的支持,而我又没有安装pcre,可以加上–without-http_rewrite_module参数屏蔽重写功能!

pcre我是这么安装的

sudo apt-get install pcre-devel

又报了个错误

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package pcre-devel

正确的应该为

sudo apt-get install libpcre3 libpcre3-dev

然后重新编译nginx正常

 

此条目发表在树莓派, 笔记分类目录,贴了, , 标签。将固定链接加入收藏夹。

5 Responses to 树莓派安装pcre pcre-devel

  1. Pingback引用通告: linux(树莓派)安装web.py+nginx | php博客

发表评论

电子邮件地址不会被公开。 必填项已用*标注