Nginx 编译报错:SSL modules require the OpenSSL library

ginx 编译报错:SSL modules require the OpenSSL library

1
2
3
4
./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.

在编译 Nginx 时遇到这样的错误,明显是缺少 openssl 环境,需要手动安装

CentOS

1
$ yum -y install openssl openssl-devel

Ubuntu

1
$ apt -y install openssl openssl-devel