您的位置:首页 > 其它

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

2016-05-03 16:58 716 查看
环境 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 是设置源码目录,而不是编译安装后的目录。
http://dngood.blog.51cto.com/446195/623925
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: