As shown in title, the error message is as follows:
/bin/sh:line 2:./config:no such file or directorymake[1]: * * * [/usr/local/ssl/.openssl/include/openssl/ssl.h] Error 127 MAKE[1]: Leaving directory '/usr/local/src/nginx-1.9.9 ' make: * * * [build] Error 2
Need to explain is, I compile here the use of Nginx source code is 1.9.9. According to the error message we know that the error is because nginx at compile time and can not find the corresponding file in the/usr/local/ssl/.openssl/directory, in fact, we open/usr/local/ssl/ This directory can be found in this directory is not the. OpenSSL directory, so we modify the Nginx compile when the path selection of OpenSSL can solve this problem
Solution:
Open the /usr/local/src/nginx-1.9.9/auto/lib/openssl/conf file under the Nginx source file:
Find this piece of code:
core_incs= "$CORE _incs $OPENSSL/.openssl/include" core_deps= "$CORE _deps $OPENSSL/.openssl/include/openssl/ssl.h" core_libs= "$CORE _libs $OPENSSL/.openssl/lib/libssl.a" core_libs= "$CORE _libs $OPENSSL/.openssl/lib/libcrypto.a" core_libs= "$CORE _libs $NGX _LIBDL"
Change to the following code:
core_incs= "$CORE _incs $OPENSSL/.openssl/include" core_deps= "$CORE _deps $OPENSSL/include/openssl/ssl.h" core_libs= " $CORE _libs $OPENSSL/lib/libssl.a "core_libs=" $CORE _libs $OPENSSL/lib/libcrypto.a "core_libs=" $CORE _libs $NGX _LIBDL "
And then the installation of Nginx compiled can be
PS: Reference article:
This article is from "Zifangsky's personal blog" blog, make sure to keep this source http://983836259.blog.51cto.com/7311475/1835809
Fix nginx add OpenSSL module compile times error problem