Home  >  Article  >  Operation and Maintenance  >  Compiling and installing nginx requires the PCRE library

Compiling and installing nginx requires the PCRE library

PHP中文网
PHP中文网Original
2017-06-19 11:19:474629browse

Compiling and installing nginx requires the pcre package. If it is not installed, the following prompt will appear:

<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>

You need to install the devel package of pcre, pcre-devel. Just use yum to install: (The following command also includes the installation of ssl, zlib and other dependencies)

<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>

The above is the detailed content of Compiling and installing nginx requires the PCRE library. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Linux command summaryNext article:Linux command summary