LoginSignup
6

More than 5 years have passed since last update.

posted at

updated at

nginxビルド時のエラー

CentOSにてnginxをビルドしてみたらエラー

まずはソースをダウンロード

wget http://nginx.org/download/nginx-1.4.0.tar.gz

configure実行

./configure --prefix=/usr/local --conf-path=/etc/nginx/nginx.conf


そしたらエラー

./configure: error: the HTTP rewrite module requires the PCRE librSary.
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 libraryが必要と言ってはる。
PCRE libraryは正規表現ライブラリ。
URLのrewriteやLocationの指定で正規表現によるマッチングが行えるようになるとのこと。

というわけでインストールしてみる

yum -y install pcre-devel

再度configure実行

./configure --prefix=/usr/local --conf-path=/etc/nginx/nginx.conf

ようやく成功。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
6