Nginx在Mac OS X Lion上安装.找不到PCRE

ste*_*eah 12 pcre nginx osx-lion

首先,我正在尝试编译所有源代码,我不使用MacPorts或HomeBrew.

我已经安装了pcre /usr/local/pcre-8.21并将其符号链接到/usr/local/pcre.

我在这里设置/usr/local/pcre/bin了我的PATH变量.

`/usr/local:/usr/local/mysql/bin:/usr/local/pcre/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin`
Run Code Online (Sandbox Code Playgroud)

我现在正在尝试安装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.

我尝试过设置,--with-pcre=/usr/local/pcre/bin但它只是尝试重新安装PCRE.

任何人都可以帮我解决这个问题吗?谢谢.

LiJ*_*ung 12

Nginx需要PCRE - Perl兼容正则表达式(http://www.pcre.org/)

下载PCRE并安装PCRE:

cd pcre-8.01
./configure --prefix=/usr/local
make
sudo make install
Run Code Online (Sandbox Code Playgroud)

在nginx文件夹中输入以进行安装:

cd nginx-0.8.33
./configure --prefix=/usr/local --with-http_ssl_module
make
sudo make install
Run Code Online (Sandbox Code Playgroud)