首页 >运维 >linux运维 >编译安装nginx却requires the PCRE library

编译安装nginx却requires the PCRE library

PHP中文网
PHP中文网原创
2017-06-19 11:19:474647浏览

编译安装nginx需要pcre包,未安装会有如下提示:

<span class="pun">./<span class="pln">configure<span class="pun">:<span class="pln"> error<span class="pun">:<span class="pln"> the HTTP rewrite <span class="kwd">module<span class="pln"> requires the PCRE library<span class="pun">.<span class="pln">
<span class="typ">You<span class="pln"> can either disable the <span class="kwd">module<span class="pln"> <span class="kwd">by<span class="pln"> <span class="kwd">using<span class="pln"> <span class="pun">--<span class="pln">without<span class="pun">-<span class="pln">http_rewrite_module
option<span class="pun">,<span class="pln"> <span class="kwd">or<span class="pln"> install the PCRE library <span class="kwd">into<span class="pln"> the system<span class="pun">,<span class="pln"> <span class="kwd">or<span class="pln"> build the PCRE library
statically <span class="kwd">from<span class="pln"> the source <span class="kwd">with<span class="pln"> nginx <span class="kwd">by<span class="pln"> <span class="kwd">using<span class="pln"> <span class="pun">--<span class="kwd">with<span class="pun">-<span class="pln">pcre<span class="pun">=<<span class="pln">path<span class="pun">><span class="pln"> option<span class="pun">.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>

需要安装pcre的devel包,pcre-devel。使用yum安装即可:(以下命令还带有ssl、zlib等依赖的安装)

<span class="pln">yum <span class="pun">-<span class="pln">y install zlib zlib<span class="pun">-<span class="pln">devel openssl openssl<span class="pun">--<span class="pln">devel pcre pcre<span class="pun">-<span class="pln">devel<br></span></span></span></span></span></span></span></span></span>

以上是编译安装nginx却requires the PCRE library的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn