./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option.
./configure: error: the HTTP gzip module requires the zlib library. You can either disable the module by using --without-http_gzip_module option, or install the zlib library into the system, or build the zlib library statically from the source with nginx by using --with-zlib=<path> option.
./configure: error: SSL modules require the OpenSSL library. You can either do not enable the modules, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using --with-openssl=<path> option.
make -f objs/Makefile make[1]: Entering directory `/root/nginx-1.17.1' cd ~/pcre-8.43 \ && if [ -f Makefile ]; then make distclean; fi \ && CC="cc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \ ./configure --disable-shared /bin/sh: line 0: cd: /root/pcre-8.43: No such file or directory make[1]: *** [/root/pcre-8.43/Makefile] Error 1 make[1]: Leaving directory `/root/nginx-1.17.1' make: *** [build] Error 2
终端输入make && make install后,出现了以上错误。根据错误提示内容中的**/root/pcre-8.43: No such file or directory可以看出这个路径是不存在的。通过ls /root**发现确实是不存在此文件,因此需要重新在终端中使用./configure并重新配置相应的正确路径。
无效编译器
1 2 3 4
configure: error: Invalid C++ compiler or C++ compiler flags make[1]: *** [/root/pcre-8.43/Makefile] Error 1 make[1]: Leaving directory `/root/nginx-1.17.1' make: *** [build] Error 2
In file included from src/core/ngx_core.h:83:0, from src/core/nginx.c:9: src/event/ngx_event_openssl.h:15:25: fatal error: openssl/ssl.h: No such file or directory #include <openssl/ssl.h> ^ compilation terminated. make[1]: *** [objs/src/core/nginx.o] Error 1 make[1]: Leaving directory `/root/nginx-1.17.1' make: *** [build] Error 2