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 一路順風

發佈了171 篇原創文章 · 獲贊 19 · 訪問量 86萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章