编译安装nginx时pcre模块报错的解决
2014-02-13 11:44
316 查看
CentOS 6.4 x86_64系统,编译安装nginx 1.4.5。
./configure时先是提示需要pcre的lib文件。用rpm -qa | grep pcre看了一下,pcre-7.8-6.el6.x86_64是已经安装过的。
于是用--with-pcre=/lib64指定了pcre的.so文件路径。但是在make的时候提示如下错误
make -f objs/Makefile
make[1]: Entering directory `/usr/local/src/nginx-1.4.5′
cd /usr/local/pcre /
&& if [ -f Makefile ]; then make distclean; fi /
&& CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " /
./configure –disable-shared
/bin/sh: line 2: ./configure: No such file or directory
make[1]: *** [/usr/local/pcre/Makefile] Error 127
make[1]: Leaving directory `/usr/local/src/nginx-1.4.5′
make: *** [build] Error 2
用./configure --help看了一下,原来“--with-pcre=”参数要指定的是源码文件。百度了一下也有说是要下个pcre的源码包指定路径过去。
我觉得既然已经安装过一个pcre了,还要在编译安装一个实在有点儿蛋疼。。所以自己倒腾了一下,发现其实并不用再找源码包编译,只要把pcre-devel装上就OK。安装完成后,./configure参数改成--with-pcre,不要=和后面的路径。
还有SSL的支持也是需要openssl-devel的。(这个yum装把,用rpm会被依赖关系搞到蛋疼)
总结一下,nginx编译安装基本上需要以下几个东东:
1.gcc-----------------必不可少的
2.zlib-----------------gzip需要
3.openssl(包括openssl-devel)-----SSL支持需要
4.pcre(包括pcre-devel)--------让nginx支持正则表达式
我最后用的./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-pcre --with-http_ssl_module
看到以下显示这一步就成功了
Configuration summary
+ using system PCRE library
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using system zlib library
后面愉快的make && make install把!
./configure时先是提示需要pcre的lib文件。用rpm -qa | grep pcre看了一下,pcre-7.8-6.el6.x86_64是已经安装过的。
于是用--with-pcre=/lib64指定了pcre的.so文件路径。但是在make的时候提示如下错误
make -f objs/Makefile
make[1]: Entering directory `/usr/local/src/nginx-1.4.5′
cd /usr/local/pcre /
&& if [ -f Makefile ]; then make distclean; fi /
&& CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " /
./configure –disable-shared
/bin/sh: line 2: ./configure: No such file or directory
make[1]: *** [/usr/local/pcre/Makefile] Error 127
make[1]: Leaving directory `/usr/local/src/nginx-1.4.5′
make: *** [build] Error 2
用./configure --help看了一下,原来“--with-pcre=”参数要指定的是源码文件。百度了一下也有说是要下个pcre的源码包指定路径过去。
我觉得既然已经安装过一个pcre了,还要在编译安装一个实在有点儿蛋疼。。所以自己倒腾了一下,发现其实并不用再找源码包编译,只要把pcre-devel装上就OK。安装完成后,./configure参数改成--with-pcre,不要=和后面的路径。
还有SSL的支持也是需要openssl-devel的。(这个yum装把,用rpm会被依赖关系搞到蛋疼)
总结一下,nginx编译安装基本上需要以下几个东东:
1.gcc-----------------必不可少的
2.zlib-----------------gzip需要
3.openssl(包括openssl-devel)-----SSL支持需要
4.pcre(包括pcre-devel)--------让nginx支持正则表达式
我最后用的./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-pcre --with-http_ssl_module
看到以下显示这一步就成功了
Configuration summary
+ using system PCRE library
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using system zlib library
后面愉快的make && make install把!
相关文章推荐
- 访问Nginx发生SSL connection error的一种情况
- Nginx+Naxsi部署专业级Web应用防火墙
- CentOS 6.2实战部署Nginx+MySQL+PHP
- window+nginx+php环境配置 附配置搭配说明
- 解析CI即CodeIgniter框架在Nginx下的重写规则
- 基于Nginx0.8.54+PHP5.3.4+MySQL5.5.8的全新LNMP稳定版架构搭建的VPS
- Nginx(PHP/fastcgi)的PATH_INFO问题
- 如何让Nginx支持中文文件名具体设置步骤
- Nginx upstream的5种权重分配方式分享
- nginx禁止某个IP访问站点的设置方法
- 从Nginx切换到Tengine的步骤分享
- Nginx+PHP(FastCGI)搭建高并发WEB服务器(自动安装脚本)第二版
- mac下安装nginx和php
- nginx设置上传目录无执行权限的方法
- Nginx 下配置SSL证书的方法
- windows下nginxHTTP服务器入门教程初级篇
- 实现nginx&php服务器配置的非主流配置方法
- nginx全局变量整理小结
- nginx could not build the server_names_hash 解决方法