make -f objs/Makefile
make[1]: 進入目錄“/opt/nginx-1.14.0”
cd /usr/include/openssl \
&& if [ -f Makefile ]; then make clean; fi \
&& ./config --prefix=/usr/include/openssl/.openssl no-shared no-threads \
&& make \
&& make install_sw LIBDIR=lib
/bin/sh:行2: ./config: 沒有那個文件或目錄
make[1]: *** [/usr/include/openssl/.openssl/include/openssl/ssl.h] 錯誤 127
make[1]: 離開目錄“/opt/nginx-1.14.0”
make: *** [build] 錯誤 2
出現這個問題決絕辦法:將你編譯代命了也就是 --with-openssl=DIR這個路徑指向你的源碼安裝包路徑而不是你安裝後的路徑!
–with-pcre force PCRE library usage 使用默認的pcre庫,默認使用系統自帶的pcre
–with-pcre=DIR set path to PCRE library sources 使用自己安裝的pcre
–with-pcre Nginx的rewrite功能需要使用pcre庫才能工作,而Nginx的編譯參數裏面的這個選項並不是像常規的那樣指定pcre的安裝目錄,而是指定pcre源代碼的目錄。
也就是說,如果你的系統路徑下已經可以找到pcre的lib和include文件,這個選項可以不指定了。如果你的系統沒有安裝pcre,那麼就指定該選項,Nginx會在編譯的時候從你指定的這個目錄把pcre編譯進來。
–with-openssl
–with-zlib
–with-md5
–with-sha1
這幾個選項跟pcre一樣,指定的是源代碼目錄,不是這些類庫的安裝目錄。