make[1]: *** [/usr/local/pcre//Makefile] Error 127

环境 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 是设置源码目录,而不是编译安装后的目录。



本文转自 dongnan 51CTO博客,原文链接: http://blog.51cto.com/dngood/623925

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值