转载: http://dngood.blog.51cto.com/446195/623925
环境 nginx 1.0.5
configure 配置通过
./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/pcre/ --with-openssl=/usr/local/openssl/ --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --http-client-body-temp-path=/var/tmp/nginx/client/ --http-proxy-temp-path=/var/tmp/nginx/proxy/ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ --user=nginx --group=nginx
make 错误
[root@nginx nginx-1.0.5]# make
make -f objs/Makefile
make[1]: Entering directory `/root/nginx/nginx-1.0.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 `/root/nginx/nginx-1.0.5'
make: *** [build] Error 2
google
make[1]: *** [/usr/local/pcre//Makefile] Error 127
分析
[root@nginx nginx-1.0.5]# ./configure --help | grep '\--with-pcre'
--with-pcre force PCRE library usage
--with-pcre=DIR set path to PCRE library sources
--with-pcre-opt=OPTIONS set additional options for PCRE building
source ????????
解决
[root@nginx nginx-1.0.5]# ./configure --prefix=/usr/local/nginx --with-pcre=../pcre-8.12/ --with-openssl=/usr/local/openssl/ --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --http-client-body-temp-path=/var/tmp/nginx/client/ --http-proxy-temp-path=/var/tmp/nginx/proxy/ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ --user=nginx --group=nginx
[root@nginx nginx-1.0.5]# make
make -f objs/Makefile
make[1]: Entering directory `/root/nginx/nginx-1.0.5'
cd ../pcre-8.12/ \
&& if [ -f Makefile ]; then make distclean; fi \
&& CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
./configure --disable-shared
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... make[1]: *** [../pcre-8.12//Makefile]
ok
总结:--with-pcre=DIR 是设置源码目录,而不是编译安装后的目录。
nginx make时遇到的错误 make[1]: *** [/usr/local/pcre//Makefile] Error 127
精选 转载文章标签 nginx make时遇到的错误 文章分类 Nginx 服务器
![](https://ucenter.51cto.com/images/noavatar_middle.gif)
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
nginx编译出错:make[1]: *** [/usr/local/ssl/.openssl/include/openssl/ssl.h] Error 127
nginx编译出错:make[1]: *** [/usr/local/ssl/.openssl/include/openssl/ssl.h] Error 127
nginx 编译安装 Error 127 openssl/ssl.h nginx升级 -
执行make命令时遇到127权限问题
127错误
UBUNTU 127错误