nginx编译出错 bin/sh: line 2: ./configure: No such file or directory

    安装使用的是nginx-0.8.54 稳定版。一开始按常规的指定编译参数:

./configure –user=www –group=www –prefix=/usr/local/nginx –with-http_ssl_module –with-http_sub_module –with-http_gzip_static_module –with-http_stub_status_module  –add-module=/usr/local/src/nginx_upstream_jvm_route/   –with-http_realip_module –with-pcre=/usr/local/pcre

         到make阶段报错:

[root@test01 nginx-0.8.54]# make 
make -f objs/Makefile 
make[1]: Entering directory `/usr/local/src/nginx-0.8.54′ 
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-0.8.54′ 
make: *** [build] Error 2

         下意识的google了几下,别人碰到的很少,也么解决好。不怕,好歹之前也玩过嵌入式的皮毛,自己写过makefile。编译nginx怎么会去pcre目录下找makefile呢?那我指定pcre源码目录给它。

root@test01 nginx-0.8.54]# ./configure –user=www –group=www –prefix=/usr/local/nginx –with-http_ssl_module –with-http_sub_module –with-http_gzip_static_module –with-http_stub_status_module  –add-module=/usr/local/src/nginx_upstream_jvm_route/  –with-http_realip_module –with-pcre=/usr/local/src/pcre-8.10

          再次编译,make && make install 一路顺风

你可能感兴趣的:(Linux)