In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Background
Recently, when upgrading nginx1.14.1 to nginx1.17.3 version, I found an error in openssl. Record the occurrence of the problem and the process of solving it for your reference.
problem
When upgrading nginx, I used the compilation parameters of the original version to compile the new version 1.17.3 as follows:
# / usr/local/nginx/sbin/nginx-V get compilation parameters:-- prefix=/usr/local/nginx-- with-http_ssl_module-- with-openssl=/usr/local/openssl-- with-http_stub_status_module-- with-http_dav_module-- with-http_realip_module-- with-http_gzip_static_module-- with-http_v2_module
When compiling the new version of nginx,make with the compilation parameters of the old version, an error was found. The operation and information are as follows:
# tar-zxvf nginx-1.17.3.tar.gz# cd nginx-1.17.3#. / configure-- prefix=/usr/local/nginx-- with-http_ssl_module-- with-openssl=/usr/local/openssl-- with-http_stub_status_module-- with-http_dav_module-- with-http_realip_module-- with-http_gzip_static_module-- with-http_v2_module# makemake-f objs/Makefilemake [1]: Entering directory `/ root/soft/nginx-1.17.3'cd / usr/local/openssl\ & & if [- f Makefile] Then make clean; fi\ &. / config-- prefix=/usr/local/openssl/.openssl no-shared no-threads\ & & make\ & & make install_sw LIBDIR=lib/bin/sh: line 2:. / config: No such file or directorymake [1]: * * [/ usr/local/openssl/.openssl/include/openssl/ssl.h] Error 127make [1]: Leaving directory `
From the error message, you can see that the compilation is caused by the error of the openssl-related component, which may be caused by the parameter "--with-openssl=/usr/local/openssl". The file "/ usr/local/openssl/.openssl/include/openssl/ssl.h" is mentioned here. I tried to find this file and found that it couldn't be found: (/ usr/local/openssl is my own installation of openssl)
# ll / usr/local/openssl/.openssl/ls: cannot access / usr/local/openssl/.openssl/: No such file or directory
It can be found that the .openssl directory itself does not exist. It should be that nginx version 1.17.3 went to the "/ usr/local/openssl/.openssl/" directory by default when compiling, which led to the failure of make.
Solve
After discovering the possible cause of the problem, try to modify the relevant compilation information (auto/lib/openssl/conf) when nginx1.17.3 adds the openssl module:
# vi auto/lib/openssl/conf 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" / / in this file, see the core related directory of openssl The directory .openssl has been added. Try to modify the directory information and remove the directory .openssl: # more auto/lib/open/ssl CORE_INCS= "$CORE_INCS $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"
After modifying the information of auto/lib/openssl/conf, recompile and install nginx1.17.3, and you can compile and install successfully.
# make clean#. / configure-- prefix=/usr/local/nginx-- with-http_ssl_module-- with-openssl=/usr/local/openssl-- with-http_stub_status_module-- with-http_dav_module-- with-http_realip_module-- with-http_gzip_static_module-- with-http_v2_module# make & & make install
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.