The Nginx is configured under CentOS7, but the error is consistent. The error message is:
./nginx:error while loading shared libraries:libcrypto.so.1.1:cannot open Shared object file:no such file or directory
As shown in the following illustration:
To detect the cause first, check by the following command line:
LDD $ (Which/usr/local/nginx/sbin/nginx)
The results of the execution are shown in the following illustration:
The error is due to less library files: libcrypto.so.1.1 files, showing as not found
Next look at OpenSSL version, and the results you enter are shown in the following illustration:
From the command line: OpenSSL version
The error message is: Openssl:error while loading shared libraries:libssl.so.1.1:cannot open Shared object file:no such file or directory
The command line to resolve the problem is as follows:
# ln-s/usr/local/lib64/libssl.so.1.1/usr/lib64/libssl.so.1.1 ln-s/usr/local/lib64/libcrypto.so.1.1/usr/lib64/ libcrypto.so.1.1
Then, execute
# LDD $ (Which/usr/local/nginx/sbin/nginx)
The results of the view are shown in the following illustration:
At this point the problem given in the topic is solved.
Try restarting Nginx.
[Root@localhost sbin]#./nginx
nginx:the configuration file/usr/local/nginx/conf/nginx.conf syntax is OK
Nginx:configuration file/usr/local/nginx/conf/nginx.conf Test is successful
If the browser displays the following interface, it means that the Nginx server has been successfully configured under CentOS: